From 7f9ec5a5bd95f46d994953daa5dab588c04c04d0 Mon Sep 17 00:00:00 2001 From: DarthSim Date: Thu, 25 Jan 2024 21:14:43 +0300 Subject: [PATCH] k6: Check that body size is not NaN before metering it --- k6/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k6/index.js b/k6/index.js index 1a960750..ae865eb5 100644 --- a/k6/index.js +++ b/k6/index.js @@ -68,5 +68,5 @@ export default function() { group_durations[url.group].add(res.timings.duration); const body_size = Math.round(parseInt(res.headers["Content-Length"]) / 10.24) / 100; - group_sizes[url.group].add(body_size); + if (!isNaN(body_size)) group_sizes[url.group].add(body_size); }