File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,18 @@ const benchmarks = [
25
25
] ;
26
26
27
27
async function run_benchmarks ( ) {
28
+ let total_time = 0 ;
29
+ let total_gc_time = 0 ;
28
30
// eslint-disable-next-line no-console
29
31
console . log ( '-- Benchmarking Started --' ) ;
30
32
$ . push ( { } , true ) ;
31
33
try {
32
34
for ( const benchmark of benchmarks ) {
35
+ const results = await benchmark ( ) ;
33
36
// eslint-disable-next-line no-console
34
- console . log ( await benchmark ( ) ) ;
37
+ console . log ( results ) ;
38
+ total_time += Number ( results . time ) ;
39
+ total_gc_time += Number ( results . gc_time ) ;
35
40
}
36
41
} catch ( e ) {
37
42
// eslint-disable-next-line no-console
@@ -42,7 +47,12 @@ async function run_benchmarks() {
42
47
}
43
48
$ . pop ( ) ;
44
49
// eslint-disable-next-line no-console
45
- console . log ( '-- Benchmarking Complete --' ) ;
50
+ console . log ( `-- Benchmarking Complete --` ) ;
51
+ // eslint-disable-next-line no-console
52
+ console . log ( {
53
+ total_time : total_time . toFixed ( 2 ) ,
54
+ total_gc_time : total_gc_time . toFixed ( 2 )
55
+ } ) ;
46
56
}
47
57
48
58
run_benchmarks ( ) ;
You can’t perform that action at this time.
0 commit comments