You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Buffer.byteLength benchmark does not test base64 encoding correctly #60836
Run the buffer byteLength benchmark for base64 encoding.
Expected: getInput should return a base64-encoded string when encoding is 'base64'.
Actual: getInput returns the original string, not the base64-encoded string.
How often does it reproduce? Is there a required condition?
Run the buffer byteLength benchmark for base64 encoding.
Expected: getInput should return a base64-encoded string when encoding is 'base64'.
Actual: getInput returns the original string, not the base64-encoded string.
What is the expected behavior? Why is that the expected behavior?
getInput should return the base64-encoded string so the benchmark accurately tests Buffer.byteLength for base64 input.
What do you see instead?
The benchmark tests the original string, not the base64-encoded string.
Additional information
Suggested fix:
In benchmark/buffers/buffer-bytelength-string.js, update getInput to return Buffer.from(original, 'utf8').toString('base64') when encoding is 'base64'.
This will ensure the benchmark is correct.
Activity
benchmark: fix incorrect base64 input in byteLength benchmark
benchmark: fix incorrect base64 input in byteLength benchmark
benchmark: fix incorrect base64 input in byteLength benchmark
benchmark: fix incorrect base64 input in byteLength benchmark
benchmark: fix incorrect base64 input in byteLength benchmark
benchmark: fix incorrect base64 input in byteLength benchmark
benchmark: fix incorrect base64 input in byteLength benchmark
benchmark: fix incorrect base64 input in byteLength benchmark
benchmark: fix incorrect base64 input in byteLength benchmark