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) {