Skip to content

Commit

Permalink
Merge pull request #138 from nolanlawson/nolan/remove-duration
Browse files Browse the repository at this point in the history
fix: remove duration from github agent comment
  • Loading branch information
nolanlawson authored Feb 6, 2019
2 parents 26037f7 + 21cd1df commit 81f892e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ Base commit: `abcdef0` | Target commit: `1234567`

## *Project Foo*

foo.js | metric | base(`abcdef0`) | target(`1234567`) | trend
--- | --- | --- | --- | ---
Foo Test 1 | duration | 3000.00 (±2.00 ms) | 4000.00 (±3.00 ms) | +1000.0ms (33.3%) 👎
Foo Test 2 | duration | 7000.00 (±-3.25 ms) | 5000.00 (±7.30 ms) | -2000.0ms (28.6%) 👍
foo.js | base(`abcdef0`) | target(`1234567`) | trend
--- | --- | --- | ---
Foo Test 1 | 3000.00 (±2.00 ms) | 4000.00 (±3.00 ms) | +1000.0ms (33.3%) 👎
Foo Test 2 | 7000.00 (±-3.25 ms) | 5000.00 (±7.30 ms) | -2000.0ms (28.6%) 👍

## *Project Bar*

bar.js | metric | base(`abcdef0`) | target(`1234567`) | trend
--- | --- | --- | --- | ---
Bar Test 1 | duration | 1000.00 (±-1.00 ms) | 2000.00 (±-2.78 ms) | +1000.0ms (100.0%) 👎
</details>
bar.js | base(`abcdef0`) | target(`1234567`) | trend
--- | --- | --- | ---
Bar Test 1 | 1000.00 (±-1.00 ms) | 2000.00 (±-2.78 ms) | +1000.0ms (100.0%) 👎
</details>
3 changes: 1 addition & 2 deletions packages/best-github-integration/src/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ function generateRows(stats, name = '', rows = []) {

allRows.push([
name + node.name,
'duration',
`${baseMed.toFixed(2)}${baseStats.medianAbsoluteDeviation.toFixed(2)} ms)`,
`${targetMed.toFixed(2)}${targetStats.medianAbsoluteDeviation.toFixed(2)} ms)`,
sign + relativeTrend.toFixed(1) + 'ms (' + percentage.toFixed(1) + '%) ' + (samplesComparison === 0 ? '👌' : samplesComparison === 1 ? '👎' : '👍'),
Expand All @@ -59,7 +58,7 @@ function generateTable(baseCommit, targetCommit, stats) {
const mdName = benchmarkName.replace('.benchmark', '');
return {
table: {
headers: [`${mdName}`, 'metric', `base(\`${baseCommit}\`)`, `target(\`${targetCommit}\`)`, 'trend'],
headers: [`${mdName}`, `base(\`${baseCommit}\`)`, `target(\`${targetCommit}\`)`, 'trend'],
rows: generateRows(stats),
projectName
},
Expand Down

0 comments on commit 81f892e

Please sign in to comment.