Ejemplo n.º 1
0
 /** List all captured data. */
 public static void list() {
   if (MAIN.lastIndex == 0) {
     // don't list anything if no statistics collected
     return;
   }
   try {
     MAIN.listUnvisited();
     MAIN.listTop("MOST CALLED", MAIN.count, top);
     MAIN.listTop("MOST TIME USED", MAIN.time, top);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Ejemplo n.º 2
0
 /** Start collecting data. */
 public static void startCollecting() {
   MAIN.stop = false;
   MAIN.lastTime = System.currentTimeMillis();
 }
Ejemplo n.º 3
0
 /** Stop collecting data. */
 public static void stopCollecting() {
   MAIN.stop = true;
 }
Ejemplo n.º 4
0
 /**
  * This method is called by an instrumented application whenever a line of code is executed.
  *
  * @param i the line number that is executed
  */
 public static void visit(int i) {
   MAIN.addVisit(i);
 }