Skip to content

Commit

Permalink
Fixed double negative sign in benchmarks (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
HalidOdat authored Jun 11, 2020
1 parent e841234 commit 51d2def
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function isSignificant(changesDur, changesErr, masterDur, masterErr) {
}

function convertToMarkdown(results) {
/* Example results:
/* Example results:
group changes master
----- ------- ------
character module 1.03 22.2±0.41ms ? B/sec 1.00 21.6±0.53ms ? B/sec
Expand Down Expand Up @@ -147,7 +147,7 @@ function convertToMarkdown(results) {
let masterErrorSecs = convertDurToSeconds(masterDurSplit[1].slice(0, -2), masterUnits);

let difference = -(1 - changesDurSecs / masterDurSecs) * 100;
difference = (changesDurSecs <= masterDurSecs ? "-" : "+") + difference.toFixed(2) + "%";
difference = (changesDurSecs <= masterDurSecs ? "" : "+") + difference.toFixed(2) + "%";
if (isSignificant(changesDurSecs, changesErrorSecs, masterDurSecs, masterErrorSecs)) {
if (changesDurSecs < masterDurSecs) {
changesDuration = `**${changesDuration}**`;
Expand Down Expand Up @@ -187,7 +187,7 @@ ${benchResults}
}

function convertToTableObject(results) {
/* Example results:
/* Example results:
group changes master
----- ------- ------
character module 1.03 22.2±0.41ms ? B/sec 1.00 21.6±0.53ms ? B/sec
Expand Down

0 comments on commit 51d2def

Please sign in to comment.