Skip to content

Commit

Permalink
Fix: tag resource intensive requests by group
Browse files Browse the repository at this point in the history
Signed-off-by: Kate Goldenring <[email protected]>
  • Loading branch information
kate-goldenring committed Nov 10, 2024
1 parent 9d2c8cc commit 4222e7d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/scripts/resource-intensive.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,14 @@ export function setup() {
*/
export default function () {
let endpoint = deploy.serviceEndpointForApp(name, namespace, route);

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

Expand Down

0 comments on commit 4222e7d

Please sign in to comment.