chore(ci): add telemetry-enabled perf task with local HTTPS server MONGOSH-3454#2784
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a telemetry-enabled performance CI task so Evergreen can produce side-by-side perf series (baseline vs telemetry-on) by routing telemetry to a locally launched HTTPS sink and validating that expected telemetry events were emitted.
Changes:
- Adds a new Evergreen task
perf_tests_linux_x64_telemetryand gates telemetry setup/verification inrun_perf_testsviamongosh_perf_telemetry. - Introduces a minimal local HTTPS telemetry sink (
.evergreen/telemetry-sink.js) that records received events to NDJSON for post-run assertions/logging. - Updates the perf smoke-test harness to reset cross-process telemetry throttling state between iterations.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cli-repl/src/smoke-tests.ts | Resets on-disk telemetry throttling state between perf iterations. |
| docs/superpowers/specs/2026-07-22-telemetry-perf-ci-task-design.md | Design doc describing the telemetry-enabled perf task approach and verification. |
| .evergreen/telemetry-sink.js | Adds a local HTTPS NDJSON-recording sink used by the telemetry perf task. |
| .evergreen/evergreen.yml.in | Adds telemetry-gated sink orchestration + verification and introduces the new perf task. |
| .evergreen.yml | Regenerated Evergreen config reflecting the new task and gated telemetry block. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e9bd1f5 to
fda2b62
Compare
|
fda2b62 to
70130af
Compare
70130af to
36e1e94
Compare
| script: | | ||
| mkdir -p npm-logs | ||
| tar cvzf npm-logs.tgz npm-logs | ||
| tar czf npm-logs.tgz npm-logs |
There was a problem hiding this comment.
removing the verbose flag here makes most conclusions visible without clicking through to one of the log viewers
| @@ -0,0 +1,36 @@ | |||
| #! /usr/bin/env bash | |||
|
|
|||
| # Fetch raw performance results for a given Evergreen version/patch from the | |||
There was a problem hiding this comment.
Makes comparisons easy
| - command: shell.exec | ||
| # Passed explicitly instead of add_expansions_to_env: the spawned | ||
| # mongosh processes inherit this environment, so we avoid handing | ||
| # every expansion (including secrets) to 160 child processes. |
There was a problem hiding this comment.
From where do we get this number? How do we know it is exactly 160 child processes?
There was a problem hiding this comment.
Each scenario runs 20 times, so it actually should be 180 I didn't count mongodb_version, but also not necessary to mention this count, removed!
|
|
||
| process.on('SIGTERM', () => { | ||
| server.closeAllConnections?.(); | ||
| server.close(() => process.exit(0)); |
There was a problem hiding this comment.
Shouldn't we wait here for the write stream to actually finish flushing to disk?
| connection_count=$(grep -c '"event":"new-connection"' telemetry-sink-events.ldjson || true) | ||
| echo "identify=$identify_count new-connection=$connection_count" | ||
| [ "$identify_count" -ge 100 ] | ||
| [ "$connection_count" -ge 80 ] |
There was a problem hiding this comment.
Also these numbers, how do we decide on those?
There was a problem hiding this comment.
I am just trying to see if anything arrived on the server, in case of misconfiguration I didn't want the perf tests to happily be green but nothing reached the server. I've lowered the barrier to pass by a ton, just 10 events need to show up. We have unit/int tests elsewhere to check this keeps working.
| fi | ||
| add_expansions_to_env: true | ||
| binary: bash | ||
| args: ["src/.evergreen/perf-send.sh"] |
There was a problem hiding this comment.
Where do we use perf-get.sh?
There was a problem hiding this comment.
No where! That is for humans/agents to use locally, as long as you're on the corp vpn you can pull down perf resutls, makes it easier to browse and compare than using the perf baron ui
No description provided.