InstructionCount
classInstructionCount
kotlin.Any | |
↳ | android.os.Debug.InstructionCount |
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()); }
Summary
Public constructors | |
---|---|
Public methods | |
---|---|
open Boolean |
collect() Collect instruction counts. |
open Int |
Return the total number of method-invocation instructions executed globally. |
open Int |
Return the total number of instructions executed globally (i.e. in all threads). |
open Boolean |
Reset counters and ensure counts are running. |
Public constructors
Public methods
collect
open funcollect(): Boolean
Deprecated: Deprecated in Java.
Collect instruction counts. May or may not stop the counting process.
globalMethodInvocations
open funglobalMethodInvocations(): Int
Deprecated: Deprecated in Java.
Return the total number of method-invocation instructions executed globally.
globalTotal
open funglobalTotal(): Int
Deprecated: Deprecated in Java.
Return the total number of instructions executed globally (i.e. in all threads).
resetAndStart
open funresetAndStart(): Boolean
Deprecated: Deprecated in Java.
Reset counters and ensure counts are running. Counts may have already been running.
Return | |
---|---|
Boolean |
true if counting was started |