Package android.os

Class Debug.InstructionCount

  • Enclosing class:
    Debug

    @Deprecated
    public static class Debug.InstructionCount
    extends Object
    Deprecated.
    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());
       }
     
    • Constructor Detail

      • InstructionCount

        public InstructionCount()
        Deprecated.
    • Method Detail

      • resetAndStart

        public boolean resetAndStart()
        Deprecated.
        Reset counters and ensure counts are running. Counts may have already been running.
        Returns:
        true if counting was started
      • collect

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

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

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