diff options
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/sampler')
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/sampler/TickCounter.java | 2 | ||||
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/sampler/aggregator/TickedDataAggregator.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/sampler/TickCounter.java b/spark-common/src/main/java/me/lucko/spark/sampler/TickCounter.java index d6b754b..059e420 100644 --- a/spark-common/src/main/java/me/lucko/spark/sampler/TickCounter.java +++ b/spark-common/src/main/java/me/lucko/spark/sampler/TickCounter.java @@ -41,7 +41,7 @@ public interface TickCounter extends AutoCloseable { * * @return the current tick */ - long getCurrentTick(); + int getCurrentTick(); /** * Adds a task to be called each time the tick increments diff --git a/spark-common/src/main/java/me/lucko/spark/sampler/aggregator/TickedDataAggregator.java b/spark-common/src/main/java/me/lucko/spark/sampler/aggregator/TickedDataAggregator.java index dc241a9..2c68b02 100644 --- a/spark-common/src/main/java/me/lucko/spark/sampler/aggregator/TickedDataAggregator.java +++ b/spark-common/src/main/java/me/lucko/spark/sampler/aggregator/TickedDataAggregator.java @@ -65,7 +65,7 @@ public class TickedDataAggregator implements DataAggregator { private final Object mutex = new Object(); // state - private long currentTick = -1; + private int currentTick = -1; private TickList currentData = new TickList(0); public TickedDataAggregator(ExecutorService workerPool, TickCounter tickCounter, ThreadGrouper threadGrouper, int interval, boolean includeLineNumbers, int tickLengthThreshold) { @@ -82,7 +82,7 @@ public class TickedDataAggregator implements DataAggregator { @Override public void insertData(String threadName, StackTraceElement[] stack) { synchronized (this.mutex) { - long tick = this.tickCounter.getCurrentTick(); + int tick = this.tickCounter.getCurrentTick(); if (this.currentTick != tick) { pushCurrentTick(); this.currentTick = tick; |