aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2022-05-12 20:54:26 +0100
committerLuck <git@lucko.me>2022-05-12 20:54:26 +0100
commit3b124e7995f0ce976f69ae940566e2ba7dd56287 (patch)
tree473caf05a850de07cf5d482d668b7befd5fe0143
parentc92099d289ec764ddb41c4c03d236ccb7825d5f4 (diff)
downloadspark-3b124e7995f0ce976f69ae940566e2ba7dd56287.tar.gz
spark-3b124e7995f0ce976f69ae940566e2ba7dd56287.tar.bz2
spark-3b124e7995f0ce976f69ae940566e2ba7dd56287.zip
Include sampler end time in proto
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java1
-rw-r--r--spark-common/src/main/proto/spark/spark_sampler.proto1
2 files changed, 2 insertions, 0 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java b/spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java
index 5b236f1..ce466a0 100644
--- a/spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java
+++ b/spark-common/src/main/java/me/lucko/spark/common/sampler/AbstractSampler.java
@@ -96,6 +96,7 @@ public abstract class AbstractSampler implements Sampler {
.setPlatformMetadata(platform.getPlugin().getPlatformInfo().toData().toProto())
.setCreator(creator.toData().toProto())
.setStartTime(this.startTime)
+ .setEndTime(System.currentTimeMillis())
.setInterval(this.interval)
.setThreadDumper(this.threadDumper.getMetadata())
.setDataAggregator(dataAggregator.getMetadata());
diff --git a/spark-common/src/main/proto/spark/spark_sampler.proto b/spark-common/src/main/proto/spark/spark_sampler.proto
index 48e2a87..51bdd64 100644
--- a/spark-common/src/main/proto/spark/spark_sampler.proto
+++ b/spark-common/src/main/proto/spark/spark_sampler.proto
@@ -24,6 +24,7 @@ message SamplerMetadata {
PlatformStatistics platform_statistics = 8;
SystemStatistics system_statistics = 9;
map<string, string> server_configurations = 10;
+ int64 end_time = 11;
message ThreadDumper {
Type type = 1;