Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Do not merge] v4.x iast perf reg #4797

Closed
wants to merge 17 commits into from
3 changes: 3 additions & 0 deletions benchmark/sirun/appsec-iast/insecure-bank.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
app.set('port', port)
const server = http.createServer(app)

process.on('uncaughtException', console.error)

Check failure on line 9 in benchmark/sirun/appsec-iast/insecure-bank.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement
process.on('unhandledRejection', console.error)

Check failure on line 10 in benchmark/sirun/appsec-iast/insecure-bank.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected console statement

server.listen(port, () => { server.close() })
70 changes: 6 additions & 64 deletions benchmark/sirun/appsec-iast/meta.json
Original file line number Diff line number Diff line change
@@ -1,77 +1,19 @@
{
"name": "appsec-iast",
"cachegrind": false,
"instructions": true,
"iterations": 15,
"instructions": false,
"iterations": 1,
"variants": {
"no-vulnerability-control": {
"setup": "bash -c \"nohup node client.js >/dev/null 2>&1 &\"",
"run": "node --require ../../../init.js server-without-vulnerability.js",
"run_with_affinity": "bash -c \"taskset -c $CPU_AFFINITY node --require ../../../init.js server-without-vulnerability.js\"",
"env": {
"DD_IAST_ENABLED": "0"
}
},
"no-vulnerability-iast-enabled-default-config": {
"setup": "bash -c \"nohup node client.js >/dev/null 2>&1 &\"",
"run": "node --require ../../../init.js server-without-vulnerability.js",
"run_with_affinity": "bash -c \"taskset -c $CPU_AFFINITY node --require ../../../init.js server-without-vulnerability.js\"",
"baseline": "no-vulnerability-control",
"env": {
"DD_IAST_ENABLED": "1"
}
},
"no-vulnerability-iast-enabled-always-active": {
"setup": "bash -c \"nohup node client.js >/dev/null 2>&1 &\"",
"run": "node --require ../../../init.js server-without-vulnerability.js",
"run_with_affinity": "bash -c \"taskset -c $CPU_AFFINITY node --require ../../../init.js server-without-vulnerability.js\"",
"baseline": "no-vulnerability-control",
"env": {
"DD_IAST_ENABLED": "1",
"DD_IAST_REQUEST_SAMPLING": "100",
"DD_IAST_MAX_CONCURRENT_REQUESTS": "1000",
"DD_IAST_MAX_CONTEXT_OPERATIONS": "100"
}
},
"with-vulnerability-control": {
"setup": "bash -c \"nohup node client.js >/dev/null 2>&1 &\"",
"run": "node --require ../../../init.js server-with-vulnerability.js",
"run_with_affinity": "bash -c \"taskset -c $CPU_AFFINITY node --require ../../../init.js server-with-vulnerability.js\"",
"env": {
"DD_IAST_ENABLED": "0"
}
},
"with-vulnerability-iast-enabled-default-config": {
"setup": "bash -c \"nohup node client.js >/dev/null 2>&1 &\"",
"run": "node --require ../../../init.js server-with-vulnerability.js",
"run_with_affinity": "bash -c \"taskset -c $CPU_AFFINITY node --require ../../../init.js server-with-vulnerability.js\"",
"baseline": "with-vulnerability-control",
"env": {
"DD_IAST_ENABLED": "1"
}
},
"with-vulnerability-iast-enabled-always-active": {
"setup": "bash -c \"nohup node client.js >/dev/null 2>&1 &\"",
"run": "node --require ../../../init.js server-with-vulnerability.js",
"run_with_affinity": "bash -c \"taskset -c $CPU_AFFINITY node --require ../../../init.js server-with-vulnerability.js\"",
"baseline": "with-vulnerability-control",
"env": {
"DD_IAST_ENABLED": "1",
"DD_IAST_REQUEST_SAMPLING": "100",
"DD_IAST_MAX_CONCURRENT_REQUESTS": "1000",
"DD_IAST_MAX_CONTEXT_OPERATIONS": "100"
}
},
"startup-time-control": {
"run": "node --require ../../../init.js insecure-bank.js",
"run_with_affinity": "bash -c \"taskset -c $CPU_AFFINITY node --require ../../../init.js insecure-bank.js\"",
"run": "node --cpu-prof --require ../../../init.js insecure-bank.js",
"run_with_affinity": "bash -c \"taskset -c $CPU_AFFINITY node --cpu-prof --cpu-prof-name control.cpuprofile --cpu-prof-dir /go/src/github.com/DataDog/apm-reliability/dd-trace-js/platform/artifacts/ --require ../../../init.js insecure-bank.js\"",
"env": {
"DD_IAST_ENABLED": "0"
}
},
"startup-time-iast-enabled": {
"run": "node --require ../../../init.js insecure-bank.js",
"run_with_affinity": "bash -c \"taskset -c $CPU_AFFINITY node --require ../../../init.js insecure-bank.js\"",
"run": "node --cpu-prof --require ../../../init.js insecure-bank.js",
"run_with_affinity": "bash -c \"taskset -c $CPU_AFFINITY node --cpu-prof --cpu-prof-name iast.cpuprofile --cpu-prof-dir /go/src/github.com/DataDog/apm-reliability/dd-trace-js/platform/artifacts/ --require ../../../init.js insecure-bank.js\"",
"baseline": "startup-time-control",
"env": {
"DD_IAST_ENABLED": "1"
Expand Down
2 changes: 1 addition & 1 deletion benchmark/sirun/run-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function exec (...args) {
if (code === 0) {
resolve()
} else {
reject(new Error('Process exited with non-zero code.'))
reject(new Error(`Process exited with non-zero code. ${code}`))
}
})
})
Expand Down
Loading