aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/profiler/ProfilerTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/profiler/ProfilerTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/profiler/ProfilerTest.java36
1 files changed, 28 insertions, 8 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/profiler/ProfilerTest.java b/src/test/java/com/google/devtools/build/lib/profiler/ProfilerTest.java
index a4b5424c1a..4c1878577e 100644
--- a/src/test/java/com/google/devtools/build/lib/profiler/ProfilerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/profiler/ProfilerTest.java
@@ -79,13 +79,27 @@ public class ProfilerTest {
throws IOException {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
profiler.start(
- kinds, buffer, format, "test", false, BlazeClock.instance(), BlazeClock.nanoTime());
+ kinds,
+ buffer,
+ format,
+ "test",
+ false,
+ BlazeClock.instance(),
+ BlazeClock.nanoTime(),
+ /* enabledCpuUsageProfiling= */ false);
return buffer;
}
private void startUnbuffered(ProfiledTaskKinds kinds) throws IOException {
profiler.start(
- kinds, null, null, "test", false, BlazeClock.instance(), BlazeClock.nanoTime());
+ kinds,
+ null,
+ null,
+ "test",
+ false,
+ BlazeClock.instance(),
+ BlazeClock.nanoTime(),
+ /* enabledCpuUsageProfiling= */ false);
}
@Test
@@ -183,7 +197,8 @@ public class ProfilerTest {
"basic test",
true,
BlazeClock.instance(),
- BlazeClock.instance().nanoTime());
+ BlazeClock.instance().nanoTime(),
+ /* enabledCpuUsageProfiling= */ false);
try (SilentCloseable c = profiler.profile(ProfilerTask.ACTION, "action task")) {
// Next task takes less than 10 ms but should be recorded anyway.
clock.advanceMillis(1);
@@ -212,7 +227,8 @@ public class ProfilerTest {
"test",
true,
BlazeClock.instance(),
- BlazeClock.instance().nanoTime());
+ BlazeClock.instance().nanoTime(),
+ /* enabledCpuUsageProfiling= */ false);
profiler.logSimpleTask(10000, 20000, ProfilerTask.VFS_STAT, "stat");
profiler.logSimpleTask(20000, 30000, ProfilerTask.REMOTE_EXECUTION, "remote execution");
@@ -320,7 +336,8 @@ public class ProfilerTest {
"test",
true,
BlazeClock.instance(),
- BlazeClock.instance().nanoTime());
+ BlazeClock.instance().nanoTime(),
+ /* enabledCpuUsageProfiling= */ false);
profiler.logSimpleTask(10000, 20000, ProfilerTask.VFS_STAT, "stat");
assertThat(ProfilerTask.VFS_STAT.collectsSlowestInstances()).isTrue();
@@ -539,7 +556,8 @@ public class ProfilerTest {
"testResilenceToNonDecreasingNanoTimes",
false,
badClock,
- initialNanoTime);
+ initialNanoTime,
+ /* enabledCpuUsageProfiling= */ false);
profiler.logSimpleTask(badClock.nanoTime(), ProfilerTask.INFO, "some task");
profiler.stop();
}
@@ -589,7 +607,8 @@ public class ProfilerTest {
"basic test",
false,
BlazeClock.instance(),
- BlazeClock.instance().nanoTime());
+ BlazeClock.instance().nanoTime(),
+ /* enabledCpuUsageProfiling= */ false);
profiler.logSimpleTaskDuration(
Profiler.nanoTimeMaybe(), Duration.ofSeconds(10), ProfilerTask.INFO, "foo");
try {
@@ -615,7 +634,8 @@ public class ProfilerTest {
"basic test",
false,
BlazeClock.instance(),
- BlazeClock.instance().nanoTime());
+ BlazeClock.instance().nanoTime(),
+ /* enabledCpuUsageProfiling= */ false);
profiler.logSimpleTaskDuration(
Profiler.nanoTimeMaybe(), Duration.ofSeconds(10), ProfilerTask.INFO, "foo");
try {