Skip to content

Comments

feat: add single-instance Cloud Run benchmark harness#365

Merged
davideme merged 21 commits intomainfrom
codex/benchmark-cloud-run-versions
Feb 15, 2026
Merged

feat: add single-instance Cloud Run benchmark harness#365
davideme merged 21 commits intomainfrom
codex/benchmark-cloud-run-versions

Conversation

@davideme
Copy link
Owner

Summary

  • add a k6-based benchmark harness for single-instance Cloud Run comparisons across 6 language implementations
  • include orchestration scripts for memory and DB passes, stress gating, and extreme concurrency appendix
  • add result/report generation and Cloud Run parity configuration helper

Included files

  • benchmarks/k6/*
  • benchmarks/results/.gitkeep
  • benchmarks/results/summary.md
  • .gitignore updates for generated benchmark outputs

Notes

  • k6 is required to execute benchmark runs
  • service URLs and DB seed commands must be filled in benchmarks/k6/services.json

Copilot AI review requested due to automatic review settings February 12, 2026 20:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a k6-based harness to benchmark single-instance Cloud Run deployments across the repo’s six language implementations, with scripts to run memory/DB passes and generate ranked summaries.

Changes:

  • Add k6 workload script and Node.js orchestration to execute warmup/fixed/stress/extreme phases and export reports.
  • Add Cloud Run parity configuration helper (gcloud command generator/executor) plus benchmark config/service maps.
  • Add benchmark results directory scaffolding, placeholder summary, and ignore rules for generated artifacts.

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
benchmarks/results/summary.md Placeholder summary that gets overwritten by generated rankings.
benchmarks/results/.gitkeep Keeps benchmarks/results/ tracked in git.
benchmarks/k6/services.json Service map template for memory/DB URLs and optional DB seed command per language.
benchmarks/k6/scenarios.js k6 constant-arrival-rate CRUD workload with weighted operation mix and seeding.
benchmarks/k6/run-benchmarks.js Orchestrates benchmark passes/runs, exports raw k6 summaries, aggregates results, and writes run-report.json + summary.md.
benchmarks/k6/generate-summary.js Regenerates benchmarks/results/summary.md from run-report.json.
benchmarks/k6/configure-cloud-run.js Applies (or dry-runs) uniform Cloud Run settings via gcloud run services update.
benchmarks/k6/config.json Default benchmark parameters, SLO gating, extreme appendix settings, and Cloud Run parity config.
benchmarks/k6/README.md Usage guide and interpretation notes for running the benchmark harness.
.gitignore Ignores generated raw benchmark exports and the JSON run report.

Comment on lines 9 to 13
- `db` pass (realistic signal)
- Fixed, fairness-first Cloud Run settings for all services
- Main ranking at fixed concurrency pressure with `concurrency=80`
- Optional non-ranking extreme run at concurrency `1000`
- Sequential service execution (no parallel cross-service load)
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

README describes the extreme run as "concurrency 1000", but the harness actually drives load via k6 constant-arrival-rate at extreme.rps (1000) while Cloud Run concurrency remains whatever is configured in config.json (80). This is misleading for interpreting results; either rename this to "1000 RPS" (or similar) and clarify Cloud Run concurrency is unchanged, or update the tooling/config to also apply a cloudRun.concurrency=1000 setting for the extreme appendix.

Copilot uses AI. Check for mistakes.
Comment on lines 18 to 23
"extreme": {
"enabled": true,
"duration": "60s",
"rps": 1000,
"runPerIteration": false
},
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

extreme.enabled is set to true by default, which contradicts the README calling the extreme run "optional" and will also trigger very large VU allocations for 1000 RPS in scenarios.js (preAllocatedVUs becomes ~2000). Consider defaulting this to false (or lowering the default RPS) and having users opt-in when they actually want the appendix run.

Copilot uses AI. Check for mistakes.
Comment on lines +79 to +90
'--max-instances',
String(cloudRun.maxInstances),
'--min-instances',
String(cloudRun.minInstances),
'--concurrency',
String(cloudRun.concurrency),
'--cpu',
String(cloudRun.cpu),
'--memory',
String(cloudRun.memory),
'--timeout',
String(cloudRun.timeout),
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

configure-cloud-run.js will happily pass "undefined" into gcloud flags if any cloudRun fields are missing from the provided config file (because of String(cloudRun.*)). Add validation with a clear error message (or safe defaults) for required keys like maxInstances/minInstances/concurrency/cpu/memory/timeout before building the command.

Copilot uses AI. Check for mistakes.
@davideme davideme force-pushed the codex/benchmark-cloud-run-versions branch from 76dbdde to 2764dda Compare February 13, 2026 09:47
@davideme davideme merged commit 7ba1bc3 into main Feb 15, 2026
@davideme davideme deleted the codex/benchmark-cloud-run-versions branch February 15, 2026 20:57
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