mirror of
https://github.com/devkitshq/notifkit.git
synced 2026-10-19 18:24:52 +02:00
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:
@@ -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("$", "")),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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=")) {
|
||||
|
||||
Reference in New Issue
Block a user