aboutsummaryrefslogtreecommitdiff
path: root/spark-common/src/main/java/me/lucko/spark/common/sampler
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2024-07-29 22:54:12 +0100
committerLuck <git@lucko.me>2024-07-29 22:54:12 +0100
commit1fb00b191cb3efd5b44d18fd2730ac6683626d67 (patch)
tree04d02538d8afbf9e9867c81e3768ebe4bc66c5d0 /spark-common/src/main/java/me/lucko/spark/common/sampler
parent6e7cc883d2d716bfcfcf871956f2acb995474d2d (diff)
downloadspark-1fb00b191cb3efd5b44d18fd2730ac6683626d67.tar.gz
spark-1fb00b191cb3efd5b44d18fd2730ac6683626d67.tar.bz2
spark-1fb00b191cb3efd5b44d18fd2730ac6683626d67.zip
Add more automated tests
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/common/sampler')
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerAccess.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerAccess.java b/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerAccess.java
index 7dcb131..84aaa95 100644
--- a/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerAccess.java
+++ b/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerAccess.java
@@ -73,14 +73,10 @@ public class AsyncProfilerAccess {
try {
profiler = load(platform);
-
if (isEventSupported(profiler, ProfilingEvent.ALLOC, false)) {
allocationProfilingEvent = ProfilingEvent.ALLOC;
}
-
- if (isEventSupported(profiler, ProfilingEvent.CPU, false)) {
- profilingEvent = ProfilingEvent.CPU;
- } else if (isEventSupported(profiler, ProfilingEvent.WALL, true)) {
+ if (isEventSupported(profiler, ProfilingEvent.WALL, true)) {
profilingEvent = ProfilingEvent.WALL;
}
} catch (Exception e) {
@@ -213,8 +209,7 @@ public class AsyncProfilerAccess {
return false;
}
- enum ProfilingEvent {
- CPU(Events.CPU),
+ public enum ProfilingEvent {
WALL(Events.WALL),
ALLOC(Events.ALLOC);