Android Guides | Samples

Android.OS.Debug.InstructionCount Class

API for gathering and querying instruction counts.

See Also: Debug+InstructionCount

Syntax

[Android.Runtime.Register("android/os/Debug$InstructionCount", DoNotGenerateAcw=true)]
public class Debug.InstructionCount : Object

Remarks

API for gathering and querying instruction counts. Example usage:

java Example

   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());
   }

[Android Documentation]

Requirements

Namespace: Android.OS
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Android.OS.Debug.InstructionCount are listed below.

See Also: Object

Public Constructors

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Collect() : Boolean
Collect instruction counts.
GlobalMethodInvocations() : Int32
Return the total number of method-invocation instructions executed globally.
GlobalTotal() : Int32
Return the total number of instructions executed globally (i.e. in all threads).
ResetAndStart() : Boolean
Reset counters and ensure counts are running.