| 1 |
import * as path from 'path'; |
| 2 |
|
| 3 |
import * as utils from '../../../utils'; |
| 4 |
|
| 5 |
import glob = require('tiny-glob'); // eslint-disable-line @typescript-eslint/no-require-imports |
| 6 |
|
| 7 |
const options = { |
| 8 |
cwd: path.join(process.cwd(), process.env.BENCHMARK_BASE_DIR as string), |
| 9 |
flush: true |
| 10 |
}; |
| 11 |
|
| 12 |
const timeStart = utils.timeStart(); |
| 13 |
|
| 14 |
glob(process.env.BENCHMARK_PATTERN as string, options) |
| 15 |
.then((matches) => { |
| 16 |
const memory = utils.getMemory(); |
| 17 |
const time = utils.timeEnd(timeStart); |
| 18 |
const measures = utils.formatMeasures(matches.length, time, memory); |
| 19 |
|
| 20 |
console.info(measures); |
| 21 |
}) |
| 22 |
.catch(() => { |
| 23 |
process.exit(0); |
| 24 |
}); |