Debian Codegraph @

fast-glob/src/benchmark/suites/regression/async/fast-glob-current.ts

raw symbols SCIP
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 ...JSON.parse(process.env.BENCHMARK_OPTIONS as string)
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 });