MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / buildOptions

Function buildOptions

tests/loadtest/script.js:48–211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46export const options = buildOptions();
47
48function buildOptions() {
49 if (SCENARIO === "baseline") {
50 return {
51 scenarios: {
52 baseline: {
53 executor: "constant-vus",
54 vus: Number(__ENV.VUS || 100),
55 duration: __ENV.DURATION || "5m",
56 gracefulStop: "30s",
57 tags: { scenario: "baseline" },
58 },
59 },
60 thresholds: dth("baseline"),
61 };
62 }
63
64 if (SCENARIO === "ramp") {
65 return {
66 scenarios: {
67 ramp: {
68 executor: "ramping-vus",
69 startVUs: Number(__ENV.START_VUS || 100),
70 stages: [
71 {
72 duration: __ENV.STAGE1 || "5m",
73 target: Number(__ENV.VUS1 || 300),
74 },
75 {
76 duration: __ENV.STAGE2 || "5m",
77 target: Number(__ENV.VUS2 || 600),
78 },
79 {
80 duration: __ENV.STAGE3 || "5m",
81 target: Number(__ENV.VUS3 || 1000),
82 },
83 ],
84 gracefulRampDown: "1m",
85 tags: { scenario: "ramp" },
86 },
87 },
88 thresholds: dth("ramp"),
89 };
90 }
91
92 if (SCENARIO === "contention") {
93 return {
94 scenarios: {
95 contention_hot: {
96 executor: "constant-arrival-rate",
97 rate: HOT_RPS,
98 timeUnit: "1s",
99 duration: __ENV.DURATION || "5m",
100 preAllocatedVUs: Number(__ENV.VUS || 200),
101 maxVUs: Number(__ENV.MAX_VUS || 800),
102 tags: { scenario: "contention_hot" },
103 exec: "hotTraffic",
104 },
105 contention_random: {

Callers 1

script.jsFile · 0.85

Calls 2

dthFunction · 0.85
mergeFunction · 0.85

Tested by

no test coverage detected