Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a reusable Bun-based metrics wrapper (script/metrics.ts) that samples CPU, memory, and disk I/O while running a command, then outputs a summary to the console and GitHub step summary. The CI test workflow is updated to run tests through this wrapper.
Changes:
- New
script/metrics.tsthat spawns a child command, collects resource samples at a configurable interval, and writes JSON + markdown summary - CI workflow (
test.yml) wraps unit and e2e test steps with the metrics script - Root
package.jsonaddstest:unit:metricsandtest:e2e:local:metricsconvenience scripts
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| script/metrics.ts | New metrics collection wrapper supporting CPU, memory, and disk (Linux/Windows) sampling |
| .github/workflows/test.yml | Wraps unit and e2e test commands with the metrics script |
| package.json | Adds local convenience scripts for running tests with metrics |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const proc = Bun.spawn(args, { | ||
| cwd, | ||
| stdout: "pipe", | ||
| stderr: "pipe", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test:unit:metricsandtest:e2e:local:metricsso the same instrumentation can be used outside CIValidation
bun turbo typecheckbun run test:unit:metricsbun script/metrics.ts --name smoke --out tmp/metrics/smoke.json -- bun --versionbun script/metrics.ts --name fail --out tmp/metrics/fail.json -- bun -e "process.exit(1)"bun run test:e2e:local:metrics(wrapper worked and printed metrics; the wrapped e2e run still had 2 failing tests on this machine)