I'd like to measure how much time my test method spends; but when I enable time based profiling by using event type as wall
I am not getting the flame graph (or call graph) appropriate time consumption.
Expectation:
All waitX methods call with relative rectangle widths in Flame Graph
or % in Call Tree
tab.
Actual:
Only wait50s
is shown in flame graph and it's width remain same irrespective of sleep time i use.
Agent Options: event=wall,interval=1ms,event=alloc
Sample Code:
public void wait1s() throws InterruptedException {
Thread.sleep(1000);
}
public void wait10s() throws InterruptedException {
Thread.sleep(10000);
}
public void wait50s() throws InterruptedException {
Thread.sleep(50000);
}
public void testTemp() throws Exception {
logger.info("Starting test");
for(int i=0;i<1;i++) {
this.wait1s();
this.wait10s();
this.wait50s();
}
logger.info("Finished test");
}