Add k6 activity ramp benchmark#236
Conversation
|
Firetiger deploy monitoring skipped This PR didn't match the auto-monitor filter configured on your GitHub connection:
Reason: PR adds k6 benchmarking infrastructure in the benchmarks directory, not changes to API endpoints (packages/api/cmd/api/) or Temporal workflows (packages/api/lib/temporal). To monitor this PR anyway, reply with |
197e498 to
1c64321
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Autofix Details
Bugbot Autofix prepared fixes for both issues found in the latest run.
- ✅ Fixed: Ingress host port default mismatch between Makefile and TypeScript
- Updated the
loadConfig()fallback forHYPEMAN_INGRESS_HOST_PORTfrom 8081 to 80 so direct k6 runs match Makefile and README defaults.
- Updated the
- ✅ Fixed: Instance body tags use per-VU
config.runIdinstead of shareddata.runId- Changed instance creation tags to use
tags.run_idso created instances share the setup-provided run ID that teardown queries for cleanup.
- Changed instance creation tags to use
Or push these changes by commenting:
@cursor push a5823bc801
Preview (a5823bc801)
diff --git a/benchmarks/k6/activity-ramp.ts b/benchmarks/k6/activity-ramp.ts
--- a/benchmarks/k6/activity-ramp.ts
+++ b/benchmarks/k6/activity-ramp.ts
@@ -139,7 +139,7 @@
function loadConfig(): Config {
const baseUrl = trimRight(requiredEnv('HYPEMAN_BASE_URL', 'http://127.0.0.1:8080'), '/');
- const ingressHostPort = intEnv('HYPEMAN_INGRESS_HOST_PORT', 8081);
+ const ingressHostPort = intEnv('HYPEMAN_INGRESS_HOST_PORT', 80);
return {
baseUrl,
@@ -297,7 +297,7 @@
tags: {
benchmark: 'activity-ramp',
hypervisor: config.hypervisor || 'server-default',
- run_id: config.runId,
+ run_id: tags.run_id,
},
skip_kernel_headers: true,
};You can send follow-ups to the cloud agent here.
1c64321 to
8336845
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed:
requiredEnvis identical toenvString, adds no validationrequiredEnvnow fails when the resolved value is empty, so missing required variables with empty fallback are enforced instead of silently defaulting.
Or push these changes by commenting:
@cursor push cb21feedc7
Preview (cb21feedc7)
diff --git a/benchmarks/k6/activity-ramp.ts b/benchmarks/k6/activity-ramp.ts
--- a/benchmarks/k6/activity-ramp.ts
+++ b/benchmarks/k6/activity-ramp.ts
@@ -492,7 +492,11 @@
}
function requiredEnv(name: string, fallback: string): string {
- return envString(name, fallback);
+ const value = envString(name, fallback);
+ if (value === '') {
+ fail(`${name} is required`);
+ }
+ return value;
}
function intEnv(name: string, fallback: number): number {You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 8336845. Configure here.
|
|
||
| function requiredEnv(name: string, fallback: string): string { | ||
| return envString(name, fallback); | ||
| } |
There was a problem hiding this comment.
requiredEnv is identical to envString, adds no validation
Low Severity
requiredEnv is a direct pass-through to envString with no additional validation — the function body is just return envString(name, fallback). The "required" semantics are misleading: two of its three call sites (HYPEMAN_BASE_URL, HYPEMAN_IMAGE) supply non-empty fallbacks, so the variables are never truly required. Actual validation of HYPEMAN_API_KEY happens separately in checkRequiredConfig. A future contributor who calls requiredEnv('NEW_VAR', '') expecting it to fail on a missing value would get a silent empty-string default instead.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 8336845. Configure here.



Summary
Validation
CloudFormation quickstart options for ingress and gp3 tuning live separately in PR #237.
Note
Low Risk
Low risk: changes are additive benchmark tooling/docs plus ignoring local
.bench/artifacts, with no runtime or production code modifications.Overview
Adds a new
k6TypeScript benchmark (benchmarks/k6/activity-ramp.ts) that ramps VUs running an instance lifecycle loop (create → wait forRunning→ HTTP probe via shared pattern ingress → delete), including setup/teardown cleanup and metrics for latency, success rates, and capacity rejections (409s) with backoff.Introduces
benchmarks/Makefileto run the benchmark viamake -C benchmarks bench-activity-ramp, exporting HTML/JSON reports under.bench/k6, and documents usage/tuning inbenchmarks/k6/README.md. Also updates.gitignoreto exclude.bench/output.Reviewed by Cursor Bugbot for commit 8336845. Bugbot is set up for automated code reviews on this repo. Configure here.