File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
test/benchmarks/mongoBench/suites Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,22 @@ function makeSingleBench(suite) {
21
21
return this . doc ;
22
22
} )
23
23
)
24
+ . benchmark ( 'ping' , benchmark =>
25
+ benchmark
26
+ . taskSize ( 0.15 ) // { ping: 1 } is 15 bytes of BSON x 10,000 iterations
27
+ . setup ( makeClient )
28
+ . setup ( connectClient )
29
+ . setup ( initDb )
30
+ . task ( async function ( ) {
31
+ for ( let i = 0 ; i < 10000 ; ++ i ) {
32
+ await this . db . command ( { ping : 1 } ) ;
33
+ }
34
+ } )
35
+ . teardown ( disconnectClient )
36
+ )
24
37
. benchmark ( 'runCommand' , benchmark =>
25
38
benchmark
39
+ // { hello: true } is 13 bytes. However the legacy hello was 16 bytes, to preserve history comparison data we leave this value as is.
26
40
. taskSize ( 0.16 )
27
41
. setup ( makeClient )
28
42
. setup ( connectClient )
You can’t perform that action at this time.
0 commit comments