@@ -4,11 +4,12 @@ use std::path::PathBuf;
44
55use anyhow:: Ok ;
66use cairo_lang_compiler:: project:: check_compiler_path;
7- use cairo_lang_test_runner:: { RunProfilerConfig , TestRunConfig , TestRunner } ;
7+ use cairo_lang_runner:: profiling:: ProfilerConfig ;
8+ use cairo_lang_test_runner:: { TestRunConfig , TestRunner } ;
89use clap:: { Parser , ValueEnum } ;
910use serde:: Serialize ;
1011
11- /// The clap-arg equivalent of [RunProfilerConfig] .
12+ /// A clap-arg wrapper for Option<[ProfilerConfig]> .
1213#[ derive( ValueEnum , Clone , Default , Debug , Serialize , PartialEq , Eq , Hash ) ]
1314#[ serde( rename_all = "kebab-case" ) ]
1415enum RunProfilerConfigArg {
@@ -17,12 +18,12 @@ enum RunProfilerConfigArg {
1718 Cairo ,
1819 Sierra ,
1920}
20- impl From < RunProfilerConfigArg > for RunProfilerConfig {
21+ impl From < RunProfilerConfigArg > for Option < ProfilerConfig > {
2122 fn from ( val : RunProfilerConfigArg ) -> Self {
2223 match val {
23- RunProfilerConfigArg :: None => RunProfilerConfig :: None ,
24- RunProfilerConfigArg :: Cairo => RunProfilerConfig :: Cairo ,
25- RunProfilerConfigArg :: Sierra => RunProfilerConfig :: Sierra ,
24+ RunProfilerConfigArg :: None => None ,
25+ RunProfilerConfigArg :: Cairo => Some ( ProfilerConfig :: Cairo ) ,
26+ RunProfilerConfigArg :: Sierra => Some ( ProfilerConfig :: Sierra ) ,
2627 }
2728 }
2829}
@@ -53,7 +54,7 @@ struct Args {
5354 #[ arg( long, default_value_t = false ) ]
5455 starknet : bool ,
5556 /// Whether to run the profiler, and what results to produce. See
56- /// [cairo_lang_test_runner::RunProfilerConfig ]
57+ /// [cairo_lang_runner::profiling::ProfilerConfig ]
5758 #[ arg( short, long, default_value_t, value_enum) ]
5859 run_profiler : RunProfilerConfigArg ,
5960 /// Should disable gas calculation.
@@ -74,7 +75,7 @@ fn main() -> anyhow::Result<()> {
7475 filter : args. filter ,
7576 ignored : args. ignored ,
7677 include_ignored : args. include_ignored ,
77- run_profiler : args. run_profiler . into ( ) ,
78+ profiler_config : args. run_profiler . into ( ) ,
7879 gas_enabled : !args. gas_disabled ,
7980 print_resource_usage : args. print_resource_usage ,
8081 } ;
0 commit comments