FileDocCategorySizeDatePackage
Profiler.javaAPI DocAndroid 1.5 API4070Wed May 06 22:42:46 BST 2009com.android.phone

Profiler

public class Profiler extends Object
Profiling utilities for the Phone app.

Fields Summary
private static final String
LOG_TAG
private static final boolean
PROFILE
static long
sTimeCallScreenRequested
static long
sTimeCallScreenOnCreate
static long
sTimeCallScreenCreated
static long
sTimeIncomingCallPanelRequested
static long
sTimeIncomingCallPanelOnCreate
static long
sTimeIncomingCallPanelCreated
Constructors Summary
private Profiler()
This class is never instantiated.


          
      
    
Methods Summary
static voidcallScreenCreated()

        if (PROFILE) {
            sTimeCallScreenCreated = SystemClock.uptimeMillis();
            dumpCallScreenStat();
        }
    
static voidcallScreenOnCreate()

        if (PROFILE) {
            sTimeCallScreenOnCreate = SystemClock.uptimeMillis();
        }
    
static voidcallScreenRequested()

        if (PROFILE) {
            sTimeCallScreenRequested = SystemClock.uptimeMillis();
        }
    
private static voiddumpCallScreenStat()

        if (PROFILE) {
            log(">>> call screen perf stats <<<");
            log(">>> request -> onCreate = " +
                    (sTimeCallScreenOnCreate - sTimeCallScreenRequested));
            log(">>> onCreate -> created = " +
                    (sTimeCallScreenCreated - sTimeCallScreenOnCreate));
        }
    
private static voiddumpIncomingCallPanelStat()

        if (PROFILE) {
            log(">>> incoming call panel perf stats <<<");
            log(">>> request -> onCreate = " +
                    (sTimeIncomingCallPanelOnCreate - sTimeIncomingCallPanelRequested));
            log(">>> onCreate -> created = " +
                    (sTimeIncomingCallPanelCreated - sTimeIncomingCallPanelOnCreate));
        }
    
static voidincomingCallPanelCreated()

        if (PROFILE) {
            sTimeIncomingCallPanelCreated = SystemClock.uptimeMillis();
            dumpIncomingCallPanelStat();
        }
    
static voidincomingCallPanelOnCreate()

        if (PROFILE) {
            sTimeIncomingCallPanelOnCreate = SystemClock.uptimeMillis();
        }
    
static voidincomingCallPanelRequested()

        if (PROFILE) {
            sTimeIncomingCallPanelRequested = SystemClock.uptimeMillis();
        }
    
private static voidlog(java.lang.String msg)

        Log.d(LOG_TAG, "[Profiler] " + msg);
    
static voidprofileViewCreate(android.view.Window win, java.lang.String tag)

        if (false) {
            ViewParent p = (ViewParent) win.getDecorView();
            while (p instanceof View) {
                p = ((View) p).getParent();
            }
            //((ViewRoot)p).profile();
            //((ViewRoot)p).setProfileTag(tag);
        }