From 89a07b40bf0414212c96945671a012035d375a25 Mon Sep 17 00:00:00 2001 From: Adien Akhmad Date: Wed, 19 Nov 2025 18:41:14 +0700 Subject: [PATCH] benchmark: read url from env variable --- bench.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bench.js b/bench.js index 4734a75..0f739ea 100644 --- a/bench.js +++ b/bench.js @@ -2,6 +2,7 @@ import http from "k6/http"; import { check } from "k6"; import { SharedArray } from "k6/data"; +const url = __ENV.TARGET_URL || "http://localhost:7007/api/image/generate"; const testData = new SharedArray("test requests", function () { return JSON.parse(open("fuzzy.json")); }); @@ -24,7 +25,6 @@ export default function () { if (!requestBody) { return; } - const url = "http://localhost:7007/api/image/generate"; const payload = JSON.stringify(requestBody); const params = { headers: {