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

Method dispatch

test/test/depth/DeepRecursion.java:37–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 }
36
37 private void dispatch() {
38 if (depth + 2 > BASE_DEPTH + ThreadLocalRandom.current().nextInt(VAR_DEPTH + 1)) {
39 return;
40 }
41
42 depth += 2;
43 switch (ThreadLocalRandom.current().nextInt(4)) {
44 case 0:
45 m0();
46 break;
47 case 1:
48 m1();
49 break;
50 case 2:
51 m2();
52 break;
53 case 3:
54 m3();
55 break;
56 }
57 depth -= 2;
58 }
59
60 public static void main(String[] args) throws Exception {
61 BASE_DEPTH = args.length > 0 ? Integer.parseInt(args[0]) : 100;

Callers 5

m0Method · 0.95
m1Method · 0.95
m2Method · 0.95
m3Method · 0.95
mainMethod · 0.95

Calls 5

m0Method · 0.95
m1Method · 0.95
m2Method · 0.95
m3Method · 0.95
currentMethod · 0.80

Tested by

no test coverage detected