From 5af0ff072168a7ff90e4ea69ac230b49300fe063 Mon Sep 17 00:00:00 2001 From: "wangshaojun.jeffery" Date: Mon, 20 May 2024 16:58:24 +0800 Subject: [PATCH] update start time stamp in autoDecideStartEndTime Signed-off-by: wangshaojun.jeffery --- .../main/java/org/eclipse/jifa/gclog/model/GCModel.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/analysis/gc-log/src/main/java/org/eclipse/jifa/gclog/model/GCModel.java b/analysis/gc-log/src/main/java/org/eclipse/jifa/gclog/model/GCModel.java index 0703b2ed..6a610a40 100644 --- a/analysis/gc-log/src/main/java/org/eclipse/jifa/gclog/model/GCModel.java +++ b/analysis/gc-log/src/main/java/org/eclipse/jifa/gclog/model/GCModel.java @@ -466,6 +466,13 @@ public void autoDecideStartEndTime() { endTime = Math.max(endTime, event.getPhases().get(event.getPhases().size() - 1).getEndTime()); } setEndTime(Math.max(this.endTime, endTime)); + // update start time. + event = gcEvents.get(0); + double startTime = event.getStartTime(); + if (event.hasPhases()) { + startTime = Math.min(startTime, event.getPhases().get(0).getStartTime()); + } + setStartTime(Math.min(this.startTime, startTime)); } @ApiMeta("timeGraphData")