Skip to content

Commit

Permalink
modifying benchmarks to reduce non-determinism (#3150)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlhunter committed May 12, 2023
1 parent 563729a commit cad3d92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions benchmark/sirun/log/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const log = require('../../../packages/dd-trace/src/log')

const {
DD_TRACE_DEBUG = 'true',
ITERATIONS = 1000,
WITH_LEVEL = 'debug'
} = process.env

Expand All @@ -19,6 +18,6 @@ log.use({
error () {}
})

for (let i = 0; i < ITERATIONS; i++) {
for (let i = 0; i < 1000000; i++) {
log[WITH_LEVEL](() => 'message')
}
2 changes: 1 addition & 1 deletion benchmark/sirun/log/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"run": "node index.js",
"run_with_affinity": "bash -c \"taskset -c $CPU_AFFINITY node index.js\"",
"cachegrind": false,
"iterations": 190,
"iterations": 40,
"instructions": true,
"variants": {
"without-log": { "env": { "DD_TRACE_DEBUG": "false" } },
Expand Down

0 comments on commit cad3d92

Please sign in to comment.