Debian Codegraph @

fast-glob/src/benchmark/suites/regression/sync/fast-glob-previous.ts

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