Skip to content

feat: add agent-eval profiling tools - #437

Draft
joshblack with Copilot wants to merge 2 commits into
mainfrom
copilot/add-support-for-profiling-agent-eval
Draft

joshblack with Copilot wants to merge 2 commits into
mainfrom
copilot/add-support-for-profiling-agent-eval

Conversation

Copilot AI commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Add profiling tools to identify CPU, memory, and Docker resource bottlenecks in agent-eval and support repeatable performance comparisons across revisions.

  • Process profiling: Capture CPU/heap profiles, memory samples, and resource counters from the CLI process. Use --no-profiles for lower-overhead resource baselines.
  • Docker usage: Opt into daemon-wide CPU, memory, and I/O samples plus before/after storage snapshots—not per-trial attribution.
  • Comparison workflow: Write machine-readable reports to unique artifact directories; document cold/warm comparisons, measurement overhead, and scope limitations.
  • Shutdown: Preserve exit status and graceful cleanup when forwarding terminal signals.
node script/profile.ts --no-profiles -- experiment plan create noop --output-path artifacts/noop-plan.json
node script/profile.ts --docker -- experiment run noop

Copilot AI and others added 2 commits October 21, 2026 02:09
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Copilot AI changed the title feat: add opt-in agent-eval profiling support feat: add agent-eval profiling tools Oct 21, 2026
Copilot AI requested a review from joshblack October 21, 2026 02:18
@joshblack
joshblack requested a balanced review from Copilot October 21, 2026 16:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Preload path handling can prevent startup, and sampling failures can incorrectly produce successful reports with stale metrics.

2 open issues
What changed in this PR

Adds repository profiling tools for measuring agent-eval CLI resource usage and comparing performance across revisions.

Changes:

  • Capture process metrics, native profiles, and optional daemon-wide Docker measurements.
  • Add profiling tests and include scripts in test and type-check configuration.
  • Document measurement scope, shutdown behavior, and repeatable comparisons.
File Description
vitest.config.ts Registers script tests.
tsconfig.json Includes scripts in type checking.
script/​profile.ts Adds the profiling wrapper and reports.
script/​profile.test.ts Tests profiling, failures, and shutdown.
script/​profile-process.ts Samples and records target process metrics.
AGENTS.md Documents profiling usage and limitations.

Review effort: Balanced

Comment thread script/profile-process.ts

function flush() {
try {
sample()
Comment thread script/profile.ts
? ['--cpu-prof', `--cpu-prof-dir=${directory}`, '--heap-prof', `--heap-prof-dir=${directory}`]
: []),
'--import',
fileURLToPath(new URL('./profile-process.ts', import.meta.url)),

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants