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"
15
15
clap = { version = " 3.2" , features = [" derive" ] }
16
16
libc = " 0.2"
17
17
18
- [target .'cfg(unix )' .dependencies ]
18
+ [target .'cfg(target_os = "linux" )' .dependencies ]
19
19
perf-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 ;
3
3
4
- #[ cfg( windows ) ]
5
- mod windows ;
4
+ #[ cfg( not ( target_os = "linux" ) ) ]
5
+ mod non_linux ;
6
6
7
- #[ cfg( unix ) ]
8
- pub use unix :: benchmark_function;
7
+ #[ cfg( target_os = "linux" ) ]
8
+ pub use linux :: benchmark_function;
9
9
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 1
1
use crate :: comm:: messages:: BenchmarkStats ;
2
2
3
3
pub 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 " ) ;
5
5
}
You can’t perform that action at this time.
0 commit comments