Skip to content

docs(examples): add benchSDK example benchmarks - #308

Open
dtice25 wants to merge 2 commits into
masterfrom
devin/examples
Open

docs(examples): add benchSDK example benchmarks#308
dtice25 wants to merge 2 commits into
masterfrom
devin/examples

Conversation

@dtice25

@dtice25 dtice25 commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a self-contained benchmarks/examples/ directory with runnable .bench.ts files that demonstrate core @benchsdk/runner patterns without requiring real provider credentials. Each example uses a tiny NoopParticipant helper that simulates create/run/destroy so the files can be exercised against any benchmarks-platform endpoint.

What's added

  • benchmarks/examples/participants.ts — mock provider factory implementing BaseParticipant with createCompute().sandbox.create().
  • 00-hello-world.bench.ts — single participant, step / measure / log basics.
  • 01-multiple-providers.bench.ts — same task against multiple providers, --provider filtering.
  • 02-phases.bench.ts — ordered phases with ctx.phase and per-phase iteration counts.
  • 03-round-robin.bench.tsgroupBy: 'round' interleaving.
  • 04-shapes.bench.ts — named shapes variants selected via --shape.
  • benchmarks/examples/README.md — build/run instructions and expected CLI output.
  • tsconfig.json — includes benchmarks/examples/**/*.ts so pnpm typecheck covers the new files.

Running an example

pnpm -r --filter "./packages/**" build
bench run benchmarks/examples/00-hello-world.bench.ts --iterations 3

All examples passed pnpm typecheck.

Link to Devin session: https://app.devin.ai/sessions/770c96fe577f4323ae5d7f8ca8b785dc
Requested by: @dtice25


Open in Devin Review

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@dtice25 dtice25 self-assigned this Aug 12, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@open-cla

open-cla Bot commented Aug 12, 2026

Copy link
Copy Markdown

Contributor License Agreement

All contributors are covered by a CLA.

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.

1 participant