Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4e58ec4

Browse filesBrowse files
targosdanielleadams
authored andcommitted
benchmark: output JSON-compatible numbers
This is to simplify the implementation of a JavaScript version of the compare.R script. PR-URL: #38778 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
1 parent 6d86f8a commit 4e58ec4
Copy full SHA for 4e58ec4

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎benchmark/common.js‎

Copy file name to clipboardExpand all lines: benchmark/common.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class Benchmark {
267267
function nanoSecondsToString(bigint) {
268268
const str = bigint.toString();
269269
const decimalPointIndex = str.length - 9;
270-
if (decimalPointIndex < 0) {
270+
if (decimalPointIndex <= 0) {
271271
return `0.${'0'.repeat(-decimalPointIndex)}${str}`;
272272
}
273273
return `${str.slice(0, decimalPointIndex)}.${str.slice(decimalPointIndex)}`;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.