Skip to content

Commit

Permalink
troubleshoot resource intensive example tags
Browse files Browse the repository at this point in the history
Signed-off-by: Kate Goldenring <kate.goldenring@fermyon.com>
  • Loading branch information
kate-goldenring committed Nov 5, 2024
1 parent 9d2c8cc commit 37923cb
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions tests/scripts/resource-intensive.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,25 @@ export function setup() {
export default function () {
let endpoint = deploy.serviceEndpointForApp(name, namespace, route);

let res = http.get(`${endpoint}?mem=${memoryKib}`, { tags: {memory_kib: memoryKib} });
let res = http.get(`${endpoint}?mem=${memoryKib}`, {
tags: {
memory_kib: memoryKib,
},
});
check(res, { "response code was 200": (res) => res.status == 200 }, { memory_kib: memoryKib });
sleep(delay);
res = http.get(`${endpoint}?cpuIter=${cpuIter}`, { tags: {cpu_iter: cpuIter} });
res = http.get(`${endpoint}?cpuIter=${cpuIter}`, {
tags: {
cpu_iter: cpuIter,
},
});
check(res, { "response code was 200": (res) => res.status == 200 }, { cpu_iter: cpuIter });
sleep(delay);
res = http.get(`${endpoint}?sleep=${sleepMs}`, { tags: {sleep: sleepMs} });
res = http.get(`${endpoint}?sleep=${sleepMs}`, {
tags: {
sleep: sleepMs,
},
});
check(res, { "response code was 200": (res) => res.status == 200 }, { sleep_ms: sleepMs });
sleep(delay);
}
Expand Down

0 comments on commit 37923cb

Please sign in to comment.