Skip to content

Commit

Permalink
Revised fix for JfrTest.regularPeak test
Browse files Browse the repository at this point in the history
  • Loading branch information
apangin committed Dec 2, 2024
1 parent deb1880 commit f8e887e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/test/jfr/JfrTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ public class JfrTests {
public void regularPeak(TestProcess p) throws Exception {
Output out = p.profile("-e cpu -d 6 -f %f.jfr");
String jfrOutPath = p.getFile("%f").getAbsolutePath();
String peakPattern = "test/jfr/Cache.*calculateTop.*";

out = Output.convertJfrToCollapsed(jfrOutPath, "--to", "2500");
assert !out.contains("test/jfr/Cache\\.calculateTop");
assert !out.contains(peakPattern);
out = Output.convertJfrToCollapsed(jfrOutPath,"--from", "2500", "--to", "5000");
assert out.samples("test/jfr/Cache\\.calculateTop") >= 1;
assert out.samples(peakPattern) >= 1;
out = Output.convertJfrToCollapsed(jfrOutPath,"--from", "5000");
assert !out.contains("test/jfr/Cache\\.calculateTop");
assert !out.contains(peakPattern);
}

/**
Expand Down

0 comments on commit f8e887e

Please sign in to comment.