Skip to content

Commit

Permalink
Merge pull request #78 from anandsuresh/anandsuresh/round-off-buffer-…
Browse files Browse the repository at this point in the history
…size

Fix random length buffer generator to round off the buffer size
  • Loading branch information
anandsuresh authored Oct 9, 2019
2 parents 0931396 + f082c3f commit 15cf479
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmark/multiple_random_size_buffers.benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const BUFFERS = []
*/
function initBuffers (benchmark) {
for (i = 0; i < benchmark.iterations; i++) {
const len = Math.random() * 65536
const len = Math.floor(Math.random() * 65536)
const buf = Buffer.alloc(len)

let j = 0
Expand Down

0 comments on commit 15cf479

Please sign in to comment.