MCPcopy Create free account
hub / github.com/npm/cli / usage

Function usage

workspaces/arborist/scripts/benchmark.js:37–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35const suites = new Set()
36
37const usage = () => {
38 console.log(`Arborist benchmark suite
39
40Runs the specified suites, or all suites if none are specified.
41
42Usage:
43 node ${relative(process.cwd(), __filename)} [options] [<suite> ...]
44
45Available suites:
46 ${allSuites.join('\n ')}
47
48Add new suites by adding a .js file in ${
49 relative(process.cwd(), resolve(__dirname, 'benchmark'))}
50
51Options:
52 -h --help print this message
53 --save=<name> save the benchmark to a given name for later comparison
54 --previous=<name> the name or commit sha of a previous run to compare against
55 (defaults to the most recent benchmark run)
56 --warn-range=<num> the range of % difference where faster/slower benchmarks
57 get highlighted in green or red. (default = 5)
58 --cache=<path> folder to use for the shared cache. Note that some suites
59 intentionally do not use this folder to test an empty cache.
60 (default = ${resolve(__dirname, 'benchmark/cache')})
61`)
62
63 process.exit(0)
64}
65
66for (let i = 2; i < process.argv.length; i++) {
67 const arg = process.argv[i]

Callers 1

benchmark.jsFile · 0.70

Calls 2

resolveFunction · 0.85
exitMethod · 0.45

Tested by

no test coverage detected