MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / javaAgent

Method javaAgent

test/test/api/ApiTests.java:42–55  ·  view source on GitHub ↗
(TestProcess p)

Source from the content-addressed store, hash-verified

40 }
41
42 @Test(
43 mainClass = JavaAgent.class,
44 output = true,
45 jvmArgs = "-javaagent:build/jar/async-profiler.jar=start,event=cpu,interval=1ms,file=%f.collapsed"
46 )
47 public void javaAgent(TestProcess p) throws Exception {
48 Output out = p.waitForExit(TestProcess.STDOUT);
49 assert p.exitCode() == 0;
50 assert out.contains("async-profiler version: \\d+");
51 Output profile = p.readFile("%f");
52 assert profile.contains("BusyLoops.method1;");
53 assert profile.contains("BusyLoops.method2;");
54 assert profile.contains("BusyLoops.method3;");
55 }
56}

Callers

nothing calls this directly

Calls 4

containsMethod · 0.95
waitForExitMethod · 0.80
exitCodeMethod · 0.80
readFileMethod · 0.80

Tested by

no test coverage detected