Examples of CallStackElement


Examples of org.stagemonitor.requestmonitor.profiler.CallStackElement

    long end = nanoTime();
    System.out.println("clocktime=" + (end - start));
  }

  public void run() {
    final CallStackElement root = Profiler.activateProfiling("root");
    for (int i = 0; i < RUN_COUNT; i++)
      iterate();
    Profiler.stop();
    System.out.println(root.toString());
  }
View Full Code Here

Examples of org.stagemonitor.requestmonitor.profiler.CallStackElement

public class AroundProfiler {
  static final ThreadLocal<CallStackElement> methodCallParent =
      new ThreadLocal<CallStackElement>();

  public static CallStackElement start(String signature) {
    CallStackElement cse = new CallStackElement(methodCallParent.get(), signature);
    methodCallParent.set(cse);
    return cse;
  }
View Full Code Here

Examples of org.stagemonitor.requestmonitor.profiler.CallStackElement

public class BeforeAfterProfiler {

  static final ThreadLocal<CallStackElement> methodCallParent = new ThreadLocal<CallStackElement>();

  public static void start(String signature) {
    methodCallParent.set(new CallStackElement(methodCallParent.get(), signature));
  }
View Full Code Here

Examples of org.stagemonitor.requestmonitor.profiler.CallStackElement

  public static void start(String signature) {
    methodCallParent.set(new CallStackElement(methodCallParent.get(), signature));
  }

  public static void stop() {
    CallStackElement currentStats = methodCallParent.get();
    currentStats.executionStopped(System.nanoTime() - currentStats.getExecutionTime());
    methodCallParent.set(currentStats.getParent());
  }
View Full Code Here

Examples of org.stagemonitor.requestmonitor.profiler.CallStackElement

import org.stagemonitor.requestmonitor.profiler.CallStackElement;

public class AroundProfilerTest {

  public int method1() {
    CallStackElement cse = AroundProfiler.start("public int ClassToProfile.method1()");
    try {
      return method2(1) + method3() + method5();
    } finally {
      AroundProfiler.stop(cse);
    }
View Full Code Here

Examples of org.stagemonitor.requestmonitor.profiler.CallStackElement

      AroundProfiler.stop(cse);
    }
  }

  private int method2(int i) {
    CallStackElement cse = AroundProfiler.start("public int ClassToProfile.method2(int i)");
    try {
      return 1 + i;
    } finally {
      AroundProfiler.stop(cse);
    }
View Full Code Here

Examples of org.stagemonitor.requestmonitor.profiler.CallStackElement

      AroundProfiler.stop(cse);
    }
  }

  private int method3() {
    CallStackElement cse = AroundProfiler.start("public int ClassToProfile.method3()");
    try {
      return method4();
    } finally {
      AroundProfiler.stop(cse);
    }
View Full Code Here

Examples of org.stagemonitor.requestmonitor.profiler.CallStackElement

      AroundProfiler.stop(cse);
    }
  }

  private int method4() {
    CallStackElement cse = AroundProfiler.start("public int ClassToProfile.method4()");
    try {
      return 4;
    } finally {
      AroundProfiler.stop(cse);
    }
View Full Code Here

Examples of org.stagemonitor.requestmonitor.profiler.CallStackElement

      AroundProfiler.stop(cse);
    }
  }

  private int method5() {
    CallStackElement cse = AroundProfiler.start("public int ClassToProfile.method5()");
    try {
      return method6() + method7();
    } finally {
      AroundProfiler.stop(cse);
    }
View Full Code Here

Examples of org.stagemonitor.requestmonitor.profiler.CallStackElement

      AroundProfiler.stop(cse);
    }
  }

  private int method6() {
    CallStackElement cse = AroundProfiler.start("public int ClassToProfile.method6()");
    try {
      return 6;
    } finally {
      AroundProfiler.stop(cse);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.