From eb35407a7fdbfa3b034cf72602116299d27f0079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 27 Oct 2024 17:50:19 +0100 Subject: [PATCH] refactor: avoid variable affectation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/lib.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib.js b/src/lib.js index 775f035..e387926 100644 --- a/src/lib.js +++ b/src/lib.js @@ -294,8 +294,7 @@ const buildMeasurementStats = latencySamples => { throw new Error('expected non-empty array, got empty array') // Latency - latencySamples.sort((a, b) => a - b) - const latencyStats = getStatsSorted(latencySamples) + const latencyStats = getStatsSorted(latencySamples.sort((a, b) => a - b)) // Throughput const throughputSamples = latencySamples