perf(profiling): adjust scaling concurrency and tier flag parsing

- Support budget tier arguments with or without leading dollar signs in test:money
- Tune worker concurrency and provider mock latency defaults for scaling tests
This commit is contained in:
coo1estguy
2026-09-25 22:47:13 +05:30
parent 4642308fe8
commit 85f92d8bda
2 changed files with 8 additions and 4 deletions
+5 -1
View File
@@ -93,7 +93,11 @@ function parseArgs() {
.split("=")[1]!
.split(",")
.map((s) => s.trim());
tiers = DEFAULT_BUDGET_TIERS.filter((t) => requested.includes(t.budget.replace("/mo", "")));
tiers = DEFAULT_BUDGET_TIERS.filter(
(t) =>
requested.includes(t.budget.replace("/mo", "")) ||
requested.includes(t.budget.replace("/mo", "").replace("$", "")),
);
}
}
+3 -3
View File
@@ -46,7 +46,7 @@ const DEFAULT_TIERS: CpuScalingTier[] = [
dbMemory: "2G",
redisCpus: "1.0",
redisMemory: "1G",
workerConcurrency: 100,
workerConcurrency: 75,
label: "2.0 vCPU",
},
{
@@ -56,7 +56,7 @@ const DEFAULT_TIERS: CpuScalingTier[] = [
dbMemory: "3G",
redisCpus: "1.0",
redisMemory: "1G",
workerConcurrency: 200,
workerConcurrency: 100,
label: "4.0 vCPU",
},
];
@@ -66,7 +66,7 @@ function parseArgs(): ScalingBenchmarkOptions {
let durationSeconds = 10;
let concurrency = 50;
let tiers = DEFAULT_TIERS;
let providerLatencyMs: number | string | undefined = process.env.PROVIDER_LATENCY_MS || "200-300";
let providerLatencyMs: number | string | undefined = process.env.PROVIDER_LATENCY_MS || "100-150";
for (const arg of args) {
if (arg.startsWith("--duration=")) {