Skip to content

Commit cad3d92

Browse files
authored
modifying benchmarks to reduce non-determinism (#3150)
1 parent 563729a commit cad3d92

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

benchmark/sirun/log/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const log = require('../../../packages/dd-trace/src/log')
44

55
const {
66
DD_TRACE_DEBUG = 'true',
7-
ITERATIONS = 1000,
87
WITH_LEVEL = 'debug'
98
} = process.env
109

@@ -19,6 +18,6 @@ log.use({
1918
error () {}
2019
})
2120

22-
for (let i = 0; i < ITERATIONS; i++) {
21+
for (let i = 0; i < 1000000; i++) {
2322
log[WITH_LEVEL](() => 'message')
2423
}

benchmark/sirun/log/meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"run": "node index.js",
44
"run_with_affinity": "bash -c \"taskset -c $CPU_AFFINITY node index.js\"",
55
"cachegrind": false,
6-
"iterations": 190,
6+
"iterations": 40,
77
"instructions": true,
88
"variants": {
99
"without-log": { "env": { "DD_TRACE_DEBUG": "false" } },

0 commit comments

Comments
 (0)