Skip to content

Commit

Permalink
changing elapsed_time to timestamp
Browse files Browse the repository at this point in the history
Signed-off-by: Bharathwaj G <[email protected]>
  • Loading branch information
bharath-techie committed Oct 9, 2023
1 parent ef42c3d commit 56d97a5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
NodePerformanceStats perfStats = nodeIdToPerfStatsMap.get(nodeId);
if (perfStats != null) {
builder.field(
"elapsed_time",
new TimeValue(System.currentTimeMillis() - perfStats.timestamp, TimeUnit.MILLISECONDS).toString()
"timestamp",
perfStats.timestamp
);
builder.field("cpu_utilization_percent", String.format(Locale.ROOT, "%.1f", perfStats.cpuUtilizationPercent));
builder.field("memory_utilization_percent", String.format(Locale.ROOT, "%.1f", perfStats.memoryUtilizationPercent));
Expand Down

0 comments on commit 56d97a5

Please sign in to comment.