Debug.InstructionCount
public
static
class
Debug.InstructionCount
extends Object
| java.lang.Object | |
| ↳ | android.os.Debug.InstructionCount |
This class was deprecated
in API level 23.
Instruction counting is no longer supported.
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 | |
|---|---|
Debug.InstructionCount()
|
|
Public methods | |
|---|---|
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. |
Inherited methods | |
|---|---|
java.lang.Object
| |
Public constructors
Public methods
collect
boolean collect ()
Collect instruction counts. May or may not stop the counting process.
| Returns | |
|---|---|
boolean |
|
globalMethodInvocations
int globalMethodInvocations ()
Return the total number of method-invocation instructions executed globally.
| Returns | |
|---|---|
int |
|
globalTotal
int globalTotal ()
Return the total number of instructions executed globally (i.e. in all threads).
| Returns | |
|---|---|
int |
|
resetAndStart
boolean resetAndStart ()
Reset counters and ensure counts are running. Counts may have already been running.
| Returns | |
|---|---|
boolean |
true if counting was started |
Interfaces
Classes
- AsyncTask
- BaseBundle
- BatteryManager
- Binder
- Build
- Build.VERSION
- Build.VERSION_CODES
- Bundle
- CancellationSignal
- ConditionVariable
- CountDownTimer
- CpuUsageInfo
- Debug
- Debug.InstructionCount
- Debug.MemoryInfo
- DropBoxManager
- DropBoxManager.Entry
- Environment
- FileObserver
- Handler
- HandlerThread
- HardwarePropertiesManager
- LocaleList
- Looper
- MemoryFile
- Message
- MessageQueue
- Messenger
- Parcel
- ParcelFileDescriptor
- ParcelFileDescriptor.AutoCloseInputStream
- ParcelFileDescriptor.AutoCloseOutputStream
- ParcelUuid
- PatternMatcher
- PersistableBundle
- PowerManager
- PowerManager.WakeLock
- Process
- RecoverySystem
- RemoteCallbackList
- ResultReceiver
- StatFs
- StrictMode
- StrictMode.ThreadPolicy
- StrictMode.ThreadPolicy.Builder
- StrictMode.VmPolicy
- StrictMode.VmPolicy.Builder
- SystemClock
- TokenWatcher
- Trace
- UserHandle
- UserManager
- Vibrator
- WorkSource
Enums
Exceptions


