Build 1.0_r1(from source)

android.os
Class Debug.InstructionCount

java.lang.Object
  extended by android.os.Debug.InstructionCount
Enclosing class:
Debug

public static class Debug.InstructionCount
extends Object

API for gathering and querying instruction counts. Example usage: Debug.InstructionCount icount = new Debug.InstructionCount(); icount.resetAndStart(); [... do lots of stuff ...] if (icount.collect()) { System.out.println("Total instructions executed: " + icount.globalTotal()); System.out.println("Method invocations: " + icount.globalMethodInvocations()); }


Constructor Summary
Debug.InstructionCount()
           
 
Method Summary
 boolean collect()
          Collect instruction counts.
 int globalMethodInvocations()
          Return the total number of method-invocation instructions executed globally.
 int globalTotal()
          Return the total number of instructions executed globally (i.e.
 boolean resetAndStart()
          Reset counters and ensure counts are running.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Debug.InstructionCount

public Debug.InstructionCount()
Method Detail

resetAndStart

public boolean resetAndStart()
Reset counters and ensure counts are running. Counts may have already been running.

Returns:
true if counting was started

collect

public boolean collect()
Collect instruction counts. May or may not stop the counting process.


globalTotal

public int globalTotal()
Return the total number of instructions executed globally (i.e. in all threads).


globalMethodInvocations

public int globalMethodInvocations()
Return the total number of method-invocation instructions executed globally.


Build 1.0_r1(from source)

Please submit a feedback, bug or feature