diff --git a/triton-profiler/src/triton_profiler.rs b/triton-profiler/src/triton_profiler.rs index fd2c91e34..0c6bfe400 100644 --- a/triton-profiler/src/triton_profiler.rs +++ b/triton-profiler/src/triton_profiler.rs @@ -75,8 +75,9 @@ impl TritonProfiler { self.stack.is_empty(), "Cannot generate report before stack is empty." ); - assert!( - self.total_time != Duration::ZERO, + assert_ne!( + Duration::ZERO, + self.total_time, "Cannot generate report before profiler has finished. Call `finish()` first." ); @@ -175,7 +176,7 @@ impl TritonProfiler { }); if std::env::var(GET_PROFILE_OUTPUT_AS_YOU_GO_ENV_VAR_NAME).is_ok() { - println!("stop: {name}; took {now:.2?}"); + println!("start: {name}"); } } @@ -231,7 +232,7 @@ impl TritonProfiler { self.profile[index].time = duration; if std::env::var(GET_PROFILE_OUTPUT_AS_YOU_GO_ENV_VAR_NAME).is_ok() { - println!("stop: {name}"); + println!("stop: {name} – took {duration:.2?}"); } }