Tabnine Logo
Profiler.stop
Code IndexAdd Tabnine to your IDE (free)

How to use
stop
method
in
org.stagemonitor.tracing.profiler.Profiler

Best Java code snippets using org.stagemonitor.tracing.profiler.Profiler.stop (Showing top 20 results out of 315)

origin: stagemonitor/stagemonitor

@Advice.OnMethodExit(inline = false, onThrowable = Throwable.class)
public static void onAfterEvaluate() {
  final CallStackElement currentFreemarkerCall = Profiler.getMethodCallParent();
  Profiler.stop();
  removeCurrentNodeIfItHasNoChildren(currentFreemarkerCall);
}
origin: stagemonitor/stagemonitor

  public String getFoo() {
    Profiler.start("String org.stagemonitor.tracing.freemarker.FreemarkerProfilingTransformerTest$TemplateModel.getFoo()");
    try {
      return "foo";
    } finally {
      Profiler.stop();
    }
  }
}
origin: stagemonitor/stagemonitor

static void method1_1_1() {
  Profiler.start("method1_1_1()");
  final CallStackElement thisCallStackElement = Profiler.getMethodCallParent();
  Profiler.stop();
  thisCallStackElement.setExecutionTime(200000000);
}
origin: stagemonitor/stagemonitor

@Test
public void testInnerPrivateMethod() {
  class Test {
    private void test() {
    }
  }
  Test test = new Test();
  CallStackElement total = Profiler.activateProfiling("total");
  test.test();
  Profiler.stop();
  Assert.assertFalse(total.toString(), total.getChildren().iterator().next().getSignature().contains("access$"));
}
origin: stagemonitor/stagemonitor

  static void method1_2_1() {
    Profiler.start("method1_2_1()");
    final CallStackElement thisCallStackElement = Profiler.getMethodCallParent();
    Profiler.stop();
    thisCallStackElement.setExecutionTime(250000000);
  }
}
origin: stagemonitor/stagemonitor

static void method1_1_2_1() {
  Profiler.start("method1_1_2_1()");
  final CallStackElement thisCallStackElement = Profiler.getMethodCallParent();
  Profiler.stop();
  thisCallStackElement.setExecutionTime(50000000);
}
origin: stagemonitor/stagemonitor

static void method1_1_2() {
  Profiler.start("method1_1_2()");
  try {
    method1_1_2_1();
  } finally {
    final CallStackElement thisCallStackElement = Profiler.getMethodCallParent();
    Profiler.stop();
    thisCallStackElement.setExecutionTime(250000000);
  }
}
origin: stagemonitor/stagemonitor

static CallStackElement method0() {
  final CallStackElement callStackElement = Profiler.activateProfiling("method0()");
  try {
    method1();
    return callStackElement;
  } finally {
    final CallStackElement thisCallStackElement = Profiler.getMethodCallParent();
    Profiler.stop();
    thisCallStackElement.setExecutionTime(1000000000);
  }
}
origin: stagemonitor/stagemonitor

@Test
public void testProfileServlet() throws Exception {
  Filter filter = new CompositeFilter();
  final CallStackElement total = Profiler.activateProfiling("total");
  filter.doFilter(new MockHttpServletRequest(), new MockHttpServletResponse(), new MockFilterChain());
  Profiler.stop();
  final CallStackElement serviceCall = total.getChildren().iterator().next();
  assertEquals("CompositeFilter#doFilter", serviceCall.getShortSignature());
}
origin: stagemonitor/stagemonitor

@Test
public void testDontProfileStagemonitorServlet() throws Exception {
  Filter filter = new HttpRequestMonitorFilter();
  final CallStackElement total = Profiler.activateProfiling("total");
  filter.doFilter(new MockHttpServletRequest(), new MockHttpServletResponse(), new MockFilterChain());
  Profiler.stop();
  assertEquals(0, total.getChildren().size());
}
origin: stagemonitor/stagemonitor

@Override
public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException {
  final Scope scope = new ExternalHttpRequest(tracingPlugin.getTracer(), request.getMethod().toString(), removeQuery(request.getURI()), request.getURI().getHost(), request.getURI().getPort()).createScope();
  try {
    Profiler.start(request.getMethod().toString() + " " + request.getURI() + " ");
    tracingPlugin.getTracer().inject(scope.span().context(), Format.Builtin.HTTP_HEADERS, new SpringHttpRequestInjectAdapter(request));
    return execution.execute(request, body);
  } finally {
    Profiler.stop();
    scope.close();
  }
}
origin: stagemonitor/stagemonitor

static void method1_1() {
  Profiler.start("method1_1()");
  try {
    method1_1_1();
    method1_1_2();
  } finally {
    final CallStackElement thisCallStackElement = Profiler.getMethodCallParent();
    Profiler.stop();
    thisCallStackElement.setExecutionTime(500000000);
  }
}
origin: stagemonitor/stagemonitor

@Test
public void testProfiler() {
  ProfilerTest profilerTest = new ProfilerTest();
  CallStackElement total = Profiler.activateProfiling("total");
  Assert.assertEquals(21, profilerTest.method1());
  Profiler.stop();
  Assert.assertEquals(total.toString(), 1, total.getChildren().size());
  Assert.assertEquals(total.toString(), 3, total.getChildren().get(0).getChildren().size());
  final String method5 = total.getChildren().get(0).getChildren().get(2).getSignature();
  Assert.assertTrue(method5, method5.contains("org.stagemonitor.tracing.prof.ProfilerTest.method5"));
}
origin: stagemonitor/stagemonitor

static void method1() {
  Profiler.start("method1()");
  try {
    method1_1();
    method1_2();
  } finally {
    final CallStackElement thisCallStackElement = Profiler.getMethodCallParent();
    Profiler.stop();
    thisCallStackElement.setExecutionTime(1000000000);
  }
}
origin: stagemonitor/stagemonitor

@Test
public void testProfileServlet() throws Exception {
  Servlet servlet = new DispatcherServlet();
  final CallStackElement total = Profiler.activateProfiling("total");
  servlet.service(new MockHttpServletRequest(), new MockHttpServletResponse());
  Profiler.stop();
  final CallStackElement serviceCall = total.getChildren().iterator().next();
  assertEquals("FrameworkServlet#service", serviceCall.getShortSignature());
}
origin: stagemonitor/stagemonitor

  @Test
  public void testDontProfileStagemonitorServlet() throws Exception {
    Servlet servlet = new StagemonitorFileServlet();

    final CallStackElement total = Profiler.activateProfiling("total");
    servlet.service(new MockHttpServletRequest(), new MockHttpServletResponse());
    Profiler.stop();

    assertEquals(0, total.getChildren().size());
  }
}
origin: stagemonitor/stagemonitor

@Test
public void testNoProfilingIfNotActive() {
  assertFalse(Profiler.isProfilingActive());
  Profiler.start("dummy");
  assertNull(Profiler.getMethodCallParent());
  Profiler.stop();
}
origin: stagemonitor/stagemonitor

static void method1_2() {
  Profiler.start("method1_2()");
  Profiler.addIOCall("select * from user", 50000000);
  Profiler.addIOCall("select * from address", 50000000);
  method1_2_1();
  final CallStackElement thisCallStackElement = Profiler.getMethodCallParent();
  Profiler.stop();
  thisCallStackElement.setExecutionTime(500000000);
}
static void method1_2_1() {
origin: stagemonitor/stagemonitor

@Test
public void testMeterTimer() {
  CallStackElement total = Profiler.activateProfiling("total");
  testObject.testMethod();
  Profiler.stop();
  final String signature = total.getChildren().get(0).getSignature();
  assertTrue(signature, signature.contains("org.stagemonitor.tracing.MultipleAnnotationsAndProfilerTest$TestObject.testMethod"));
  assertOneMeterExists(name("rate").tag("signature", "MultipleAnnotationsAndProfilerTest$TestObject#testMethod").build());
  assertOneTimerExists(name("timer").tag("signature", "MultipleAnnotationsAndProfilerTest$TestObject#testMethod").build());
}
origin: stagemonitor/stagemonitor

  @Test
  public void testCollectElasticsearchQueries() throws Exception {
    CallStackElement total = Profiler.activateProfiling("total");
    client.prepareSearch().setQuery(QueryBuilders.matchAllQuery()).get();
    client.prepareSearch().setQuery(QueryBuilders.matchAllQuery()).setSearchType(SearchType.DFS_QUERY_THEN_FETCH).get();
    Profiler.stop();
    Assert.assertEquals(total.toString(), "POST /_search\n" +
        "{\"query\":{\"match_all\":{\"boost\":1.0}}} ", total.getChildren().get(0).getSignature());
    Assert.assertEquals(total.toString(), "POST /_search?search_type=dfs_query_then_fetch\n" +
        "{\"query\":{\"match_all\":{\"boost\":1.0}}} ", total.getChildren().get(1).getSignature());
  }
}
org.stagemonitor.tracing.profilerProfilerstop

Popular methods of Profiler

  • addIOCall
  • activateProfiling
    Activates the profiling for the current thread by setting the provided CallStackElement as the root
  • start
  • getMethodCallParent
    Adds the current
  • isProfilingActive
  • addCall
  • clearMethodCallParent
  • deactivateProfiling

Popular in Java

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • onRequestPermissionsResult (Fragment)
  • getExternalFilesDir (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now