File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -15,5 +15,5 @@ env_logger = "0.9.0"
1515clap = { version = " 3.2" , features = [" derive" ] }
1616libc = " 0.2"
1717
18- [target .'cfg(unix )' .dependencies ]
18+ [target .'cfg(target_os = "linux" )' .dependencies ]
1919perf-event = " 0.4.7"
File renamed without changes.
Original file line number Diff line number Diff line change 1- #[ cfg( unix ) ]
2- mod unix ;
1+ #[ cfg( target_os = "linux" ) ]
2+ mod linux ;
33
4- #[ cfg( windows ) ]
5- mod windows ;
4+ #[ cfg( not ( target_os = "linux" ) ) ]
5+ mod non_linux ;
66
7- #[ cfg( unix ) ]
8- pub use unix :: benchmark_function;
7+ #[ cfg( target_os = "linux" ) ]
8+ pub use linux :: benchmark_function;
99
10- #[ cfg( windows ) ]
11- pub use windows :: benchmark_function;
10+ #[ cfg( not ( target_os = "linux" ) ) ]
11+ pub use non_linux :: benchmark_function;
Original file line number Diff line number Diff line change 11use crate :: comm:: messages:: BenchmarkStats ;
22
33pub fn benchmark_function < F : FnOnce ( ) -> R , R > ( _func : F ) -> anyhow:: Result < BenchmarkStats > {
4- panic ! ( "Runtime benchmarking is not supported on Windows " ) ;
4+ panic ! ( "Runtime benchmarking is only supported on Linux " ) ;
55}
You can’t perform that action at this time.
0 commit comments