Skip to content

Commit

Permalink
refactor: avoid variable affectation
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <[email protected]>
  • Loading branch information
jerome-benoit committed Oct 27, 2024
1 parent 8de3cc7 commit eb35407
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eb35407

Please sign in to comment.