Skip to content

Commit

Permalink
Merge branch 'master' into juan-fernandez/fix-di-atr-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
juan-fernandez committed Jan 8, 2025
2 parents dbbb323 + b36ce05 commit a0b4510
Show file tree
Hide file tree
Showing 38 changed files with 1,002 additions and 254 deletions.
28 changes: 11 additions & 17 deletions benchmark/sirun/run-all-variants.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,19 @@ const metaJson = require(path.join(process.cwd(), 'meta.json'))
const env = Object.assign({}, process.env, { DD_TRACE_STARTUP_LOGS: 'false' })

;(async () => {
try {
if (metaJson.variants) {
const variants = metaJson.variants
for (const variant in variants) {
const variantEnv = Object.assign({}, env, { SIRUN_VARIANT: variant })
await exec('sirun', ['meta-temp.json'], { env: variantEnv, stdio: getStdio() })
}
} else {
await exec('sirun', ['meta-temp.json'], { env, stdio: getStdio() })
if (metaJson.variants) {
const variants = metaJson.variants
for (const variant in variants) {
const variantEnv = Object.assign({}, env, { SIRUN_VARIANT: variant })
await exec('sirun', ['meta-temp.json'], { env: variantEnv, stdio: getStdio() })
}
} else {
await exec('sirun', ['meta-temp.json'], { env, stdio: getStdio() })
}

try {
fs.unlinkSync(path.join(process.cwd(), 'meta-temp.json'))
} catch (e) {
// it's ok if we can't delete a temp file
}
try {
fs.unlinkSync(path.join(process.cwd(), 'meta-temp.json'))
} catch (e) {
setImmediate(() => {
throw e // Older Node versions don't fail on uncaught promise rejections.
})
// it's ok if we can't delete a temp file
}
})()
10 changes: 1 addition & 9 deletions benchmark/sirun/run-one-variant.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,4 @@ process.env.DD_INSTRUMENTATION_TELEMETRY_ENABLED = 'false'

const env = Object.assign({}, process.env, { DD_TRACE_STARTUP_LOGS: 'false' })

;(async () => {
try {
await exec('sirun', ['meta-temp.json'], { env, stdio: getStdio() })
} catch (e) {
setImmediate(() => {
throw e // Older Node versions don't fail on uncaught promise rejections.
})
}
})()
exec('sirun', ['meta-temp.json'], { env, stdio: getStdio() })
Loading

0 comments on commit a0b4510

Please sign in to comment.