File tree Expand file tree Collapse file tree
packages/tinybench-plugin/benches Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 } ) ;
3636
3737( async ( ) => {
38- bench . runSync ( ) ;
38+ await bench . run ( ) ;
3939 console . table ( bench . table ( ) ) ;
4040
4141 const timingBench = withCodSpeed (
4444
4545 registerTimingBenchmarks ( timingBench ) ;
4646
47- timingBench . runSync ( ) ;
47+ await timingBench . run ( ) ;
4848 console . table ( timingBench . table ( ) ) ;
4949} ) ( ) ;
Original file line number Diff line number Diff line change @@ -8,15 +8,15 @@ const busySleep = (ms: number): void => {
88} ;
99
1010export function registerTimingBenchmarks ( bench : Bench ) {
11- bench . add ( "wait 1ms" , ( ) => {
11+ bench . add ( "wait 1ms" , async ( ) => {
1212 busySleep ( 1 ) ;
1313 } ) ;
1414
15- bench . add ( "wait 500ms" , ( ) => {
15+ bench . add ( "wait 500ms" , async ( ) => {
1616 busySleep ( 500 ) ;
1717 } ) ;
1818
19- bench . add ( "wait 1sec" , ( ) => {
19+ bench . add ( "wait 1sec" , async ( ) => {
2020 busySleep ( 1000 ) ;
2121 } ) ;
2222}
You can’t perform that action at this time.
0 commit comments