From 066d0011e7d90fd15779c02aaf2cacc52b737e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hohwiller?= Date: Mon, 16 Oct 2023 18:41:10 +0200 Subject: [PATCH] #7: fix to include last phase --- .../io/tesla/lifecycle/profiler/LifecycleProfiler.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/tesla/lifecycle/profiler/LifecycleProfiler.java b/src/main/java/io/tesla/lifecycle/profiler/LifecycleProfiler.java index 0877ee4..7eac884 100644 --- a/src/main/java/io/tesla/lifecycle/profiler/LifecycleProfiler.java +++ b/src/main/java/io/tesla/lifecycle/profiler/LifecycleProfiler.java @@ -80,9 +80,11 @@ public void onEvent(Object event) throws Exception { // projectProfile = new ProjectProfile(executionEvent.getProject()); } else if (executionEvent.getType() == ExecutionEvent.Type.ProjectSucceeded || executionEvent.getType() == ExecutionEvent.Type.ProjectFailed) { - // - // - // + if (phaseProfile != null) { + phaseProfile.stop(); + projectProfile.addPhaseProfile(phaseProfile); + phaseProfile = null; + } projectProfile.stop(); sessionProfile.addProjectProfile(projectProfile); } else if (executionEvent.getType() == ExecutionEvent.Type.MojoStarted) {