-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: synchronised ci changes with TypeScript-Demo-Lib
- Reverted Windows to NodeJS v16.14.2 - Added `--arg ci true` to `nix-shell` - Introduced continuous benchmarking
- Loading branch information
1 parent
eab9898
commit f9b97df
Showing
14 changed files
with
952 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './utils'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import b from 'benny'; | ||
import { codeBlock } from 'common-tags'; | ||
import packageJson from '../../package.json'; | ||
|
||
const suiteCommon = [ | ||
b.cycle(), | ||
b.complete(), | ||
b.save({ | ||
file: (summary) => summary.name, | ||
folder: path.join(__dirname, '../results'), | ||
version: packageJson.version, | ||
details: true, | ||
}), | ||
b.save({ | ||
file: (summary) => summary.name, | ||
folder: path.join(__dirname, '../results'), | ||
version: packageJson.version, | ||
format: 'chart.html', | ||
}), | ||
b.complete((summary) => { | ||
const filePath = path.join( | ||
__dirname, | ||
'../results', | ||
summary.name + '_metrics.txt', | ||
); | ||
fs.writeFileSync( | ||
filePath, | ||
codeBlock` | ||
# TYPE ${summary.name}_ops gauge | ||
${summary.results | ||
.map( | ||
(result) => | ||
`${summary.name}_ops{name="${result.name}"} ${result.ops}`, | ||
) | ||
.join('\n')} | ||
# TYPE ${summary.name}_margin gauge | ||
${summary.results | ||
.map( | ||
(result) => | ||
`${summary.name}_margin{name="${result.name}"} ${result.margin}`, | ||
) | ||
.join('\n')} | ||
# TYPE ${summary.name}_samples counter | ||
${summary.results | ||
.map( | ||
(result) => | ||
`${summary.name}_samples{name="${result.name}"} ${result.samples}`, | ||
) | ||
.join('\n')} | ||
` + '\n', | ||
); | ||
// eslint-disable-next-line no-console | ||
console.log('\nSaved to:', path.resolve(filePath)); | ||
}), | ||
]; | ||
|
||
export { suiteCommon }; |
Oops, something went wrong.