benchmark: read url from env variable
This commit is contained in:
parent
744e379379
commit
89a07b40bf
1 changed files with 1 additions and 1 deletions
2
bench.js
2
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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue