From 94b72e4f50d869b076228853d17625bf4cbd2903 Mon Sep 17 00:00:00 2001 From: Googler Date: Tue, 17 Sep 2024 06:47:47 -0700 Subject: [PATCH] Replace `CounterSeriesTask.ofProfilerTask` with direct constructor call ... and remove `ProfilerTask`s that are no longer used after the refactor. PiperOrigin-RevId: 675548469 Change-Id: Iad16e816904b90b9b1373e75580a04e05e9c7c5a --- .../profiler/CollectLocalResourceUsage.java | 108 ++++++++++----- .../build/lib/profiler/CounterSeriesTask.java | 128 ++++++++---------- .../lib/profiler/CounterSeriesTraceData.java | 4 +- .../devtools/build/lib/profiler/Profiler.java | 7 +- .../build/lib/profiler/ProfilerTask.java | 35 ----- 5 files changed, 140 insertions(+), 142 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/profiler/CollectLocalResourceUsage.java b/src/main/java/com/google/devtools/build/lib/profiler/CollectLocalResourceUsage.java index b200a4b0921bbe..a3bc4003e8be4b 100644 --- a/src/main/java/com/google/devtools/build/lib/profiler/CollectLocalResourceUsage.java +++ b/src/main/java/com/google/devtools/build/lib/profiler/CollectLocalResourceUsage.java @@ -286,7 +286,7 @@ private void addRange( private static class LocalCpuUsageCollector implements CounterSeriesCollector { private static final CounterSeriesTask LOCAL_CPU_USAGE = - CounterSeriesTask.ofProfilerTask(ProfilerTask.LOCAL_CPU_USAGE); + new CounterSeriesTask("CPU usage (Bazel)", "cpu", CounterSeriesTask.Color.GOOD); private final OperatingSystemMXBean osBean; private long previousCpuTimeNanos; @@ -307,7 +307,7 @@ public void collect(double deltaNanos, BiConsumer con private static class LocalMemoryUsageCollector implements CounterSeriesCollector { private static final CounterSeriesTask LOCAL_MEMORY_USAGE = - CounterSeriesTask.ofProfilerTask(ProfilerTask.LOCAL_MEMORY_USAGE); + new CounterSeriesTask("Memory usage (Bazel)", "memory", CounterSeriesTask.Color.OLIVE); private final MemoryMXBean memoryBean; private final BugReporter bugReporter; @@ -337,7 +337,7 @@ public void collect(double deltaNanos, BiConsumer con private static class SystemCpuUsageCollector implements CounterSeriesCollector { private static final CounterSeriesTask SYSTEM_CPU_USAGE = - CounterSeriesTask.ofProfilerTask(ProfilerTask.SYSTEM_CPU_USAGE); + new CounterSeriesTask("CPU usage (total)", "system cpu", CounterSeriesTask.Color.RAIL_LOAD); private final OperatingSystemMXBean osBean; private final int numProcessors; @@ -362,7 +362,7 @@ public void collect(double deltaNanos, BiConsumer con private static class SystemMemoryUsageCollector implements CounterSeriesCollector { private static final CounterSeriesTask SYSTEM_MEMORY_USAGE = - CounterSeriesTask.ofProfilerTask(ProfilerTask.SYSTEM_MEMORY_USAGE); + new CounterSeriesTask("Memory usage (total)", "system memory", CounterSeriesTask.Color.BAD); private final OperatingSystemMXBean osBean; private SystemMemoryUsageCollector(OperatingSystemMXBean osBean) { @@ -396,7 +396,8 @@ public void collect(double deltaNanos, BiConsumer con private static class WorkerMemoryUsageCollector implements CounterSeriesCollector { private static final CounterSeriesTask WORKERS_MEMORY_USAGE = - CounterSeriesTask.ofProfilerTask(ProfilerTask.WORKERS_MEMORY_USAGE); + new CounterSeriesTask( + "Workers memory usage", "workers memory", CounterSeriesTask.Color.RAIL_ANIMATION); private final WorkerProcessMetricsCollector workerProcessMetricsCollector; private WorkerMemoryUsageCollector( @@ -420,7 +421,7 @@ public void collect(double deltaNanos, BiConsumer con private static class SystemLoadAverageCollector implements CounterSeriesCollector { private static final CounterSeriesTask SYSTEM_LOAD_AVERAGE = - CounterSeriesTask.ofProfilerTask(ProfilerTask.SYSTEM_LOAD_AVERAGE); + new CounterSeriesTask("System load average", "load", CounterSeriesTask.Color.GENERIC_WORK); private final OperatingSystemMXBean osBean; private SystemLoadAverageCollector(OperatingSystemMXBean osBean) { @@ -438,9 +439,15 @@ public void collect(double deltaNanos, BiConsumer con private static class SystemNetworkUsageCollector implements CounterSeriesCollector { private static final CounterSeriesTask SYSTEM_NETWORK_UP_USAGE = - CounterSeriesTask.ofProfilerTask(ProfilerTask.SYSTEM_NETWORK_UP_USAGE); + new CounterSeriesTask( + "Network Up usage (total)", + "system network up (Mbps)", + CounterSeriesTask.Color.RAIL_RESPONSE); private static final CounterSeriesTask SYSTEM_NETWORK_DOWN_USAGE = - CounterSeriesTask.ofProfilerTask(ProfilerTask.SYSTEM_NETWORK_DOWN_USAGE); + new CounterSeriesTask( + "Network Down usage (total)", + "system network down (Mbps)", + CounterSeriesTask.Color.RAIL_RESPONSE); @Override public void collect(double deltaNanos, BiConsumer consumer) { @@ -453,9 +460,13 @@ public void collect(double deltaNanos, BiConsumer con private static class ResourceManagerEstimationCollector implements CounterSeriesCollector { private static final CounterSeriesTask MEMORY_USAGE_ESTIMATION = - CounterSeriesTask.ofProfilerTask(ProfilerTask.MEMORY_USAGE_ESTIMATION); + new CounterSeriesTask( + "Memory usage estimation", "estimated memory", CounterSeriesTask.Color.RAIL_IDLE); private static final CounterSeriesTask CPU_USAGE_ESTIMATION = - CounterSeriesTask.ofProfilerTask(ProfilerTask.CPU_USAGE_ESTIMATION); + new CounterSeriesTask( + "CPU usage estimation", + "estimated cpu", + CounterSeriesTask.Color.CQ_BUILD_ATTEMPT_PASSED); private final ResourceEstimator resourceEstimator; @@ -474,15 +485,30 @@ public void collect(double deltaNanos, BiConsumer con private static class PressureStallIndicatorCollector implements CounterSeriesCollector { private static final CounterSeriesTask PRESSURE_STALL_FULL_IO = - CounterSeriesTask.ofProfilerTask(ProfilerTask.PRESSURE_STALL_FULL_IO); - private static final CounterSeriesTask PRESSURE_STALL_FULL_MEMORY = - CounterSeriesTask.ofProfilerTask(ProfilerTask.PRESSURE_STALL_FULL_MEMORY); + new CounterSeriesTask( + "I/O pressure stall level", + "i/o pressure (full)", + CounterSeriesTask.Color.RAIL_ANIMATION); private static final CounterSeriesTask PRESSURE_STALL_SOME_IO = - CounterSeriesTask.ofProfilerTask(ProfilerTask.PRESSURE_STALL_SOME_IO); + new CounterSeriesTask( + "I/O pressure stall level", + "i/o pressure (some)", + CounterSeriesTask.Color.CQ_BUILD_ATTEMPT_FAILED); + private static final CounterSeriesTask PRESSURE_STALL_FULL_MEMORY = + new CounterSeriesTask( + "Memory pressure stall level", + "memory pressure (full)", + CounterSeriesTask.Color.THREAD_STATE_UNKNOWN); private static final CounterSeriesTask PRESSURE_STALL_SOME_MEMORY = - CounterSeriesTask.ofProfilerTask(ProfilerTask.PRESSURE_STALL_SOME_MEMORY); + new CounterSeriesTask( + "Memory pressure stall level", + "memory pressure (some)", + CounterSeriesTask.Color.RAIL_IDLE); private static final CounterSeriesTask PRESSURE_STALL_SOME_CPU = - CounterSeriesTask.ofProfilerTask(ProfilerTask.PRESSURE_STALL_SOME_CPU); + new CounterSeriesTask( + "CPU pressure stall level", + "cpu pressure (some)", + CounterSeriesTask.Color.THREAD_STATE_RUNNING); @Override public List> getStackedTaskGroups() { @@ -518,34 +544,52 @@ private record SkyFunctionProfilerTasks( ImmutableMap.of( SkyFunctions.PACKAGE, new SkyFunctionProfilerTasks( - CounterSeriesTask.ofProfilerTask(ProfilerTask.PACKAGE_SKYFUNCTION), - CounterSeriesTask.ofProfilerTask(ProfilerTask.PACKAGE_SKYFUNCTION_DONE)), + new CounterSeriesTask( + "SkyFunction (PACKAGE)", "package (total)", /* color= */ null), + new CounterSeriesTask( + "SkyFunction (PACKAGE)", "package (done)", /* color= */ null)), SkyFunctions.BZL_LOAD, new SkyFunctionProfilerTasks( - CounterSeriesTask.ofProfilerTask(ProfilerTask.BZL_LOAD_SKYFUNCTION), - CounterSeriesTask.ofProfilerTask(ProfilerTask.BZL_LOAD_SKYFUNCTION_DONE)), + new CounterSeriesTask( + "SkyFunction (BZL_LOAD)", "bzl_load (total)", /* color= */ null), + new CounterSeriesTask( + "SkyFunction (BZL_LOAD)", "bzl_load (done)", /* color= */ null)), SkyFunctions.GLOB, new SkyFunctionProfilerTasks( - CounterSeriesTask.ofProfilerTask(ProfilerTask.GLOB_SKYFUNCTION), - CounterSeriesTask.ofProfilerTask(ProfilerTask.GLOB_SKYFUNCTION_DONE)), + new CounterSeriesTask("SkyFunction (GLOB)", "glob (total)", /* color= */ null), + new CounterSeriesTask("SkyFunction (GLOB)", "glob (done)", /* color= */ null)), SkyFunctions.GLOBS, new SkyFunctionProfilerTasks( - CounterSeriesTask.ofProfilerTask(ProfilerTask.GLOBS_SKYFUNCTION), - CounterSeriesTask.ofProfilerTask(ProfilerTask.GLOBS_SKYFUNCTION_DONE)), + new CounterSeriesTask( + "SkyFunction (GLOBS)", "globs (total)", /* color= */ null), + new CounterSeriesTask( + "SkyFunction (GLOBS)", "globs (done)", /* color= */ null)), SkyFunctions.CONFIGURED_TARGET, new SkyFunctionProfilerTasks( - CounterSeriesTask.ofProfilerTask(ProfilerTask.CONFIGURED_TARGET_SKYFUNCTION), - CounterSeriesTask.ofProfilerTask( - ProfilerTask.CONFIGURED_TARGET_SKYFUNCTION_DONE)), + new CounterSeriesTask( + "SkyFunction (CONFIGURED_TARGET)", + "configured target (total)", + /* color= */ null), + new CounterSeriesTask( + "SkyFunction (CONFIGURED_TARGET)", + "configured target (done)", + /* color= */ null)), SkyFunctions.ASPECT, new SkyFunctionProfilerTasks( - CounterSeriesTask.ofProfilerTask(ProfilerTask.ASPECT_SKYFUNCTION), - CounterSeriesTask.ofProfilerTask(ProfilerTask.ASPECT_SKYFUNCTION_DONE)), + new CounterSeriesTask( + "SkyFunction (ASPECT)", "aspect (total)", /* color= */ null), + new CounterSeriesTask( + "SkyFunction (ASPECT)", "aspect (done)", /* color= */ null)), SkyFunctions.ACTION_EXECUTION, new SkyFunctionProfilerTasks( - CounterSeriesTask.ofProfilerTask(ProfilerTask.ACTION_EXECUTION_SKYFUNCTION), - CounterSeriesTask.ofProfilerTask( - ProfilerTask.ACTION_EXECUTION_SKYFUNCTION_DONE))); + new CounterSeriesTask( + "SkyFunction (ACTION_EXECUTION)", + "action execution (total)", + /* color= */ null), + new CounterSeriesTask( + "SkyFunction (ACTION_EXECUTION)", + "action execution (done)", + /* color= */ null))); private final InMemoryGraph graph; diff --git a/src/main/java/com/google/devtools/build/lib/profiler/CounterSeriesTask.java b/src/main/java/com/google/devtools/build/lib/profiler/CounterSeriesTask.java index 3d88035e924d5c..09e4b8b9b448a4 100644 --- a/src/main/java/com/google/devtools/build/lib/profiler/CounterSeriesTask.java +++ b/src/main/java/com/google/devtools/build/lib/profiler/CounterSeriesTask.java @@ -13,80 +13,66 @@ // limitations under the License. package com.google.devtools.build.lib.profiler; -import static com.google.common.base.Preconditions.checkState; -import static java.util.Map.entry; - -import com.google.common.collect.ImmutableMap; import javax.annotation.Nullable; -/** Describes counter series to be logged into profile. */ -public record CounterSeriesTask(String laneName, @Nullable String colorName, String seriesName) { - public static CounterSeriesTask ofProfilerTask(ProfilerTask profilerTask) { - checkState( - COUNTER_TASK_TO_SERIES_NAME.containsKey(profilerTask), - "COUNTER_TASK_TO_SERIES_NAME does not contain %s", - profilerTask); +/** + * Describes counter series to be logged into profile. + * + * @param laneName The lane name for the counter series. Series with the same lane name should be + * stacked when displaying. + * @param seriesName The name for the counter series. + * @param color The color for the counter series. If {@code null}, the profile viewer will pick a + * color automatically. + */ +public record CounterSeriesTask(String laneName, String seriesName, @Nullable Color color) { + /** The revered color for rendering the bar chart. */ + public enum Color { + // Pick acceptable counter colors manually, unfortunately we have to pick from these + // weird reserved names from + // https://github.com/catapult-project/catapult/blob/master/tracing/tracing/base/color_scheme.html + THREAD_STATE_UNINTERRUPTIBLE("thread_state_uninterruptible"), + THREAD_STATE_IOWAIT("thread_state_iowait"), + THREAD_STATE_RUNNING("thread_state_running"), + THREAD_STATE_RUNNABLE("thread_state_runnable"), + THREAD_STATE_SLEEPING("thread_state_sleeping"), + THREAD_STATE_UNKNOWN("thread_state_unknown"), + BACKGROUND_MEMORY_DUMP("background_memory_dump"), + LIGHT_MEMORY_DUMP("light_memory_dump"), + DETAILED_MEMORY_DUMP("detailed_memory_dump"), + VSYNC_HIGHLIGHT_COLOR("vsync_highlight_color"), + GENERIC_WORK("generic_work"), + GOOD("good"), + BAD("bad"), + TERRIBLE("terrible"), + BLACK("black"), + GREY("grey"), + WHITE("white"), + YELLOW("yellow"), + OLIVE("olive"), + RAIL_RESPONSE("rail_response"), + RAIL_ANIMATION("rail_animation"), + RAIL_IDLE("rail_idle"), + RAIL_LOAD("rail_load"), + STARTUP("startup"), + HEAP_DUMP_STACK_FRAME("heap_dump_stack_frame"), + HEAP_DUMP_OBJECT_TYPE("heap_dump_object_type"), + HEAP_DUMP_CHILD_NODE_ARROW("heap_dump_child_node_arrow"), + CQ_BUILD_RUNNING("cq_build_running"), + CQ_BUILD_PASSED("cq_build_passed"), + CQ_BUILD_FAILED("cq_build_failed"), + CQ_BUILD_ABANDONED("cq_build_abandoned"), + CQ_BUILD_ATTEMPT_RUNNIG("cq_build_attempt_runnig"), + CQ_BUILD_ATTEMPT_PASSED("cq_build_attempt_passed"), + CQ_BUILD_ATTEMPT_FAILED("cq_build_attempt_failed"); - var laneName = profilerTask.description; - var seriesName = COUNTER_TASK_TO_SERIES_NAME.get(profilerTask); - var colorName = COUNTER_TASK_TO_COLOR.get(profilerTask); - return new CounterSeriesTask(laneName, colorName, seriesName); - } + private final String value; - private static final ImmutableMap COUNTER_TASK_TO_SERIES_NAME = - ImmutableMap.ofEntries( - entry(ProfilerTask.ACTION_COUNTS, "action"), - entry(ProfilerTask.ACTION_CACHE_COUNTS, "local action cache"), - entry(ProfilerTask.LOCAL_ACTION_COUNTS, "local action"), - entry(ProfilerTask.LOCAL_CPU_USAGE, "cpu"), - entry(ProfilerTask.SYSTEM_CPU_USAGE, "system cpu"), - entry(ProfilerTask.LOCAL_MEMORY_USAGE, "memory"), - entry(ProfilerTask.SYSTEM_MEMORY_USAGE, "system memory"), - entry(ProfilerTask.SYSTEM_NETWORK_UP_USAGE, "system network up (Mbps)"), - entry(ProfilerTask.SYSTEM_NETWORK_DOWN_USAGE, "system network down (Mbps)"), - entry(ProfilerTask.WORKERS_MEMORY_USAGE, "workers memory"), - entry(ProfilerTask.SYSTEM_LOAD_AVERAGE, "load"), - entry(ProfilerTask.MEMORY_USAGE_ESTIMATION, "estimated memory"), - entry(ProfilerTask.CPU_USAGE_ESTIMATION, "estimated cpu"), - entry(ProfilerTask.PRESSURE_STALL_FULL_IO, "i/o pressure (full)"), - entry(ProfilerTask.PRESSURE_STALL_FULL_MEMORY, "memory pressure (full)"), - entry(ProfilerTask.PRESSURE_STALL_SOME_IO, "i/o pressure (some)"), - entry(ProfilerTask.PRESSURE_STALL_SOME_MEMORY, "memory pressure (some)"), - entry(ProfilerTask.PRESSURE_STALL_SOME_CPU, "cpu pressure (some)"), - entry(ProfilerTask.ACTION_EXECUTION_SKYFUNCTION, "action execution (total)"), - entry(ProfilerTask.ACTION_EXECUTION_SKYFUNCTION_DONE, "action execution (done)"), - entry(ProfilerTask.CONFIGURED_TARGET_SKYFUNCTION, "configured target (total)"), - entry(ProfilerTask.CONFIGURED_TARGET_SKYFUNCTION_DONE, "configured target (done)"), - entry(ProfilerTask.ASPECT_SKYFUNCTION, "aspect (total)"), - entry(ProfilerTask.ASPECT_SKYFUNCTION_DONE, "aspect (done)"), - entry(ProfilerTask.PACKAGE_SKYFUNCTION, "package (total)"), - entry(ProfilerTask.PACKAGE_SKYFUNCTION_DONE, "package (done)"), - entry(ProfilerTask.BZL_LOAD_SKYFUNCTION, "bzl_load (total)"), - entry(ProfilerTask.BZL_LOAD_SKYFUNCTION_DONE, "bzl_load (done)"), - entry(ProfilerTask.GLOB_SKYFUNCTION, "glob (total)"), - entry(ProfilerTask.GLOB_SKYFUNCTION_DONE, "glob (done)"), - entry(ProfilerTask.GLOBS_SKYFUNCTION, "globs (total)"), - entry(ProfilerTask.GLOBS_SKYFUNCTION_DONE, "globs (done)")); + private Color(String value) { + this.value = value; + } - // Pick acceptable counter colors manually, unfortunately we have to pick from these - // weird reserved names from - // https://github.com/catapult-project/catapult/blob/master/tracing/tracing/base/color_scheme.html - private static final ImmutableMap COUNTER_TASK_TO_COLOR = - ImmutableMap.ofEntries( - entry(ProfilerTask.LOCAL_ACTION_COUNTS, "detailed_memory_dump"), - entry(ProfilerTask.LOCAL_CPU_USAGE, "good"), - entry(ProfilerTask.SYSTEM_CPU_USAGE, "rail_load"), - entry(ProfilerTask.LOCAL_MEMORY_USAGE, "olive"), - entry(ProfilerTask.SYSTEM_MEMORY_USAGE, "bad"), - entry(ProfilerTask.SYSTEM_NETWORK_UP_USAGE, "rail_response"), - entry(ProfilerTask.SYSTEM_NETWORK_DOWN_USAGE, "rail_response"), - entry(ProfilerTask.WORKERS_MEMORY_USAGE, "rail_animation"), - entry(ProfilerTask.SYSTEM_LOAD_AVERAGE, "generic_work"), - entry(ProfilerTask.MEMORY_USAGE_ESTIMATION, "rail_idle"), - entry(ProfilerTask.CPU_USAGE_ESTIMATION, "cq_build_attempt_passed"), - entry(ProfilerTask.PRESSURE_STALL_FULL_IO, "rail_animation"), - entry(ProfilerTask.PRESSURE_STALL_SOME_IO, "cq_build_attempt_failed"), - entry(ProfilerTask.PRESSURE_STALL_FULL_MEMORY, "thread_state_unknown"), - entry(ProfilerTask.PRESSURE_STALL_SOME_MEMORY, "rail_idle"), - entry(ProfilerTask.PRESSURE_STALL_SOME_CPU, "thread_state_running")); + public String value() { + return value; + } + } } diff --git a/src/main/java/com/google/devtools/build/lib/profiler/CounterSeriesTraceData.java b/src/main/java/com/google/devtools/build/lib/profiler/CounterSeriesTraceData.java index ce8d2f0d00bad3..bce296d3f18d60 100644 --- a/src/main/java/com/google/devtools/build/lib/profiler/CounterSeriesTraceData.java +++ b/src/main/java/com/google/devtools/build/lib/profiler/CounterSeriesTraceData.java @@ -54,7 +54,9 @@ final class CounterSeriesTraceData implements TraceData { len = entry.getValue().length; this.displayName = task.laneName(); - this.colorName = task.colorName(); + if (task.color() != null) { + this.colorName = task.color().value(); + } } else { // Check that second and subsequent series have the same length as the first. Preconditions.checkState(len == entry.getValue().length); diff --git a/src/main/java/com/google/devtools/build/lib/profiler/Profiler.java b/src/main/java/com/google/devtools/build/lib/profiler/Profiler.java index 57901d0872bb35..37abbf0cedf4af 100644 --- a/src/main/java/com/google/devtools/build/lib/profiler/Profiler.java +++ b/src/main/java/com/google/devtools/build/lib/profiler/Profiler.java @@ -532,14 +532,14 @@ private void collectActionCounts() { double[] actionCountValues = actionCountTimeSeries.toDoubleArray(len); actionCountTimeSeriesRef.set(null); counterSeriesMap.put( - CounterSeriesTask.ofProfilerTask(ProfilerTask.ACTION_COUNTS), actionCountValues); + new CounterSeriesTask("action count", "action", /* color= */ null), actionCountValues); } TimeSeries actionCacheCountTimeSeries = actionCacheCountTimeSeriesRef.get(); if (actionCacheCountTimeSeries != null) { double[] actionCacheCountValues = actionCacheCountTimeSeries.toDoubleArray(len); actionCacheCountTimeSeriesRef.set(null); counterSeriesMap.put( - CounterSeriesTask.ofProfilerTask(ProfilerTask.ACTION_CACHE_COUNTS), + new CounterSeriesTask("action cache count", "local action cache", /* color= */ null), actionCacheCountValues); } if (!counterSeriesMap.isEmpty()) { @@ -552,7 +552,8 @@ private void collectActionCounts() { double[] localActionCountValues = localActionCountTimeSeries.toDoubleArray(len); localActionCountTimeSeriesRef.set(null); localCounterSeriesMap.put( - CounterSeriesTask.ofProfilerTask(ProfilerTask.LOCAL_ACTION_COUNTS), + new CounterSeriesTask( + "action count (local)", "local action", CounterSeriesTask.Color.DETAILED_MEMORY_DUMP), localActionCountValues); } if (hasNonZeroValues(localCounterSeriesMap)) { diff --git a/src/main/java/com/google/devtools/build/lib/profiler/ProfilerTask.java b/src/main/java/com/google/devtools/build/lib/profiler/ProfilerTask.java index 453dd4b9339cea..16df72b4c6176e 100644 --- a/src/main/java/com/google/devtools/build/lib/profiler/ProfilerTask.java +++ b/src/main/java/com/google/devtools/build/lib/profiler/ProfilerTask.java @@ -67,19 +67,7 @@ public enum ProfilerTask { CRITICAL_PATH("critical path"), CRITICAL_PATH_COMPONENT("critical path component"), HANDLE_GC_NOTIFICATION("gc notification"), - ACTION_COUNTS("action count"), - ACTION_CACHE_COUNTS("action cache count"), LOCAL_ACTION_COUNTS("action count (local)"), - LOCAL_CPU_USAGE("CPU usage (Bazel)"), - SYSTEM_CPU_USAGE("CPU usage (total)"), - CPU_USAGE_ESTIMATION("CPU usage estimation"), - LOCAL_MEMORY_USAGE("Memory usage (Bazel)"), - SYSTEM_MEMORY_USAGE("Memory usage (total)"), - MEMORY_USAGE_ESTIMATION("Memory usage estimation"), - SYSTEM_NETWORK_UP_USAGE("Network Up usage (total)"), - SYSTEM_NETWORK_DOWN_USAGE("Network Down usage (total)"), - WORKERS_MEMORY_USAGE("Workers memory usage"), - SYSTEM_LOAD_AVERAGE("System load average"), STARLARK_PARSER("Starlark Parser", Threshold.FIFTY_MILLIS), STARLARK_USER_FN("Starlark user function call", Threshold.FIFTY_MILLIS), STARLARK_BUILTIN_FN("Starlark builtin function call", Threshold.FIFTY_MILLIS), @@ -96,34 +84,11 @@ public enum ProfilerTask { WORKER_WORKING("waiting for response from worker"), WORKER_COPYING_OUTPUTS("copying outputs from worker"), CREDENTIAL_HELPER("calling credential helper"), - PRESSURE_STALL_FULL_IO("I/O pressure stall level"), - PRESSURE_STALL_FULL_MEMORY("Memory pressure stall level"), - PRESSURE_STALL_SOME_IO("I/O pressure stall level"), - PRESSURE_STALL_SOME_MEMORY("Memory pressure stall level"), - PRESSURE_STALL_SOME_CPU("CPU pressure stall level"), CONFLICT_CHECK("Conflict checking"), DYNAMIC_LOCK("Acquiring dynamic execution output lock", Threshold.FIFTY_MILLIS), REPOSITORY_FETCH("Fetching repository"), REPOSITORY_VENDOR("Vendoring repository"), - // Start -- SkyFunctions. - // Profile counts of SkyFunctions/SkyKeys in the graph over time. - GLOB_SKYFUNCTION("SkyFunction (GLOB)"), - GLOB_SKYFUNCTION_DONE("SkyFunction (GLOB)"), - GLOBS_SKYFUNCTION("SkyFunction (GLOBS)"), - GLOBS_SKYFUNCTION_DONE("SkyFunction (GLOB)"), - BZL_LOAD_SKYFUNCTION("SkyFunction (BZL_LOAD)"), - BZL_LOAD_SKYFUNCTION_DONE("SkyFunction (BZL_LOAD)"), - PACKAGE_SKYFUNCTION("SkyFunction (PACKAGE)"), - PACKAGE_SKYFUNCTION_DONE("SkyFunction (PACKAGE)"), - ACTION_EXECUTION_SKYFUNCTION("SkyFunction (ACTION_EXECUTION)"), - ACTION_EXECUTION_SKYFUNCTION_DONE("SkyFunction (ACTION_EXECUTION)"), - CONFIGURED_TARGET_SKYFUNCTION("SkyFunction (CONFIGURED_TARGET)"), - CONFIGURED_TARGET_SKYFUNCTION_DONE("SkyFunction (CONFIGURED_TARGET)"), - ASPECT_SKYFUNCTION("SkyFunction (ASPECT)"), - ASPECT_SKYFUNCTION_DONE("SkyFunction (ASPECT)"), - // End -- SkyFunctions. - UNKNOWN("Unknown event"); private static class Threshold {