| 1 |
import * as path from 'path'; |
| 2 |
|
| 3 |
import * as glob from '../../../..'; |
| 4 |
import * as utils from '../../../utils'; |
| 5 |
|
| 6 |
const options: glob.Options = { |
| 7 |
cwd: path.join(process.cwd(), process.env.BENCHMARK_BASE_DIR as string), |
| 8 |
unique: false |
| 9 |
}; |
| 10 |
|
| 11 |
const timeStart = utils.timeStart(); |
| 12 |
|
| 13 |
try { |
| 14 |
const matches = glob.sync(process.env.BENCHMARK_PATTERN as string, options); |
| 15 |
const memory = utils.getMemory(); |
| 16 |
const time = utils.timeEnd(timeStart); |
| 17 |
const measures = utils.formatMeasures(matches.length, time, memory); |
| 18 |
|
| 19 |
console.info(measures); |
| 20 |
} catch { |
| 21 |
process.exit(0); |
| 22 |
} |