File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
crates/divan_compat/benches Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -25,19 +25,19 @@ impl LargeInput {
2525 }
2626}
2727
28- #[ divan :: bench]
29- fn bench_large_input ( bencher : divan :: Bencher ) {
28+ #[ codspeed_divan_compat :: bench]
29+ fn bench_large_input ( bencher : codspeed_divan_compat :: Bencher ) {
3030 bencher
3131 . with_inputs ( LargeInput :: new)
3232 . bench_values ( |input| input. process ( ) ) ;
3333}
3434
35- #[ divan :: bench]
36- fn bench_large_input_local ( bencher : divan :: Bencher ) {
35+ #[ codspeed_divan_compat :: bench]
36+ fn bench_large_input_local ( bencher : codspeed_divan_compat :: Bencher ) {
3737 let input = LargeInput :: new ( ) ;
3838 bencher. bench_local ( || input. process ( ) ) ;
3939}
4040
4141fn main ( ) {
42- divan :: main ( ) ;
42+ codspeed_divan_compat :: main ( ) ;
4343}
Original file line number Diff line number Diff line change 1- #[ divan :: bench]
1+ #[ codspeed_divan_compat :: bench]
22fn sleep_1ms ( ) {
33 std:: thread:: sleep ( std:: time:: Duration :: from_millis ( 1 ) ) ;
44}
55
6- #[ divan :: bench]
6+ #[ codspeed_divan_compat :: bench]
77fn sleep_10ms ( ) {
88 std:: thread:: sleep ( std:: time:: Duration :: from_millis ( 10 ) ) ;
99}
1010
11- #[ divan :: bench]
11+ #[ codspeed_divan_compat :: bench]
1212fn sleep_50ms ( ) {
1313 std:: thread:: sleep ( std:: time:: Duration :: from_millis ( 50 ) ) ;
1414}
1515
16- #[ divan :: bench]
16+ #[ codspeed_divan_compat :: bench]
1717fn sleep_100ms ( ) {
1818 std:: thread:: sleep ( std:: time:: Duration :: from_millis ( 100 ) ) ;
1919}
2020
2121// Tests COD-1044, do not modify the sample size or count!
22- #[ divan :: bench( sample_size = 3 , sample_count = 6 ) ]
22+ #[ codspeed_divan_compat :: bench( sample_size = 3 , sample_count = 6 ) ]
2323fn sleep_100ms_with_custom_sample ( ) {
2424 std:: thread:: sleep ( std:: time:: Duration :: from_millis ( 100 ) ) ;
2525}
You can’t perform that action at this time.
0 commit comments