Skip to content

Commit

Permalink
Add JVM information to viewer metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
lucko committed Jul 18, 2024
1 parent 8379f2b commit 3907534
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ public SystemStatistics getSystemStatistics() {
.setVendorVersion(System.getProperty("java.vendor.version", "unknown"))
.setVmArgs(String.join(" ", runtimeBean.getInputArguments()))
.build()
)
.setJvm(SystemStatistics.Jvm.newBuilder()
.setName(System.getProperty("java.vm.name", "unknown"))
.setVendor(System.getProperty("java.vm.vendor", "unknown"))
.setVersion(System.getProperty("java.vm.version", "unknown"))
.build()
);

long uptime = runtimeBean.getUptime();
Expand Down
7 changes: 7 additions & 0 deletions spark-common/src/main/proto/spark/spark.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ message SystemStatistics {
Java java = 6;
int64 uptime = 7;
map<string, NetInterface> net = 8;
Jvm jvm = 9;

message Cpu {
int32 threads = 1;
Expand Down Expand Up @@ -80,6 +81,12 @@ message SystemStatistics {
string vm_args = 4;
}

message Jvm {
string name = 1;
string vendor = 2;
string version = 3;
}

message NetInterface {
RollingAverageValues rx_bytes_per_second = 1;
RollingAverageValues tx_bytes_per_second = 2;
Expand Down

0 comments on commit 3907534

Please sign in to comment.