Skip to content

Commit

Permalink
Add spinner for coverage and profiler (#2847)
Browse files Browse the repository at this point in the history
**Stack**:
- #2847 ⬅
- #2846


⚠️ *Part of a stack created by [spr](/~https://github.com/ejoffe/spr). Do
not merge manually using the UI - doing so may have unexpected results.*
  • Loading branch information
ksew1 authored Jan 13, 2025
1 parent ec1fee9 commit 9265725
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/forge-runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use futures::StreamExt;
use package_tests::with_config_resolved::TestCaseWithResolvedConfig;
use profiler_api::run_profiler;
use shared::print::print_as_warning;
use shared::spinner::Spinner;
use std::collections::HashMap;
use std::path::PathBuf;
use std::sync::Arc;
Expand Down Expand Up @@ -68,6 +69,7 @@ pub fn maybe_save_trace_and_profile(
let name = sanitize_filename::sanitize(name.replace("::", "_"));
let trace_path = save_trace_data(&name, trace_data)?;
if execution_data_to_save.profile {
let _spinner = Spinner::create_with_message("Running cairo-profiler");
run_profiler(&name, &trace_path, &execution_data_to_save.additional_args)?;
}
return Ok(Some(trace_path));
Expand All @@ -84,6 +86,7 @@ pub fn maybe_generate_coverage(
if saved_trace_data_paths.is_empty() {
print_as_warning(&anyhow!("No trace data to generate coverage from"));
} else {
let _spinner = Spinner::create_with_message("Running cairo-coverage");
run_coverage(
saved_trace_data_paths,
&execution_data_to_save.additional_args,
Expand Down

0 comments on commit 9265725

Please sign in to comment.