1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-02-07 11:36:25 +02:00

k6: Check that body size is not NaN before metering it

This commit is contained in:
DarthSim 2024-01-25 21:14:43 +03:00
parent c3466c4ac1
commit 7f9ec5a5bd

View File

@ -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);
}