MCPcopy Create free account
hub / github.com/NomicFoundation/hardhat / gnuTimeAvailable

Function gnuTimeAvailable

scripts/benchmark/helpers/memory.ts:13–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11// absent (e.g. a dev machine without the `time` package) callers fall back to
12// running unwrapped and reporting no memory, rather than failing the benchmark.
13export function gnuTimeAvailable(): boolean {
14 if (cachedAvailable === undefined) {
15 cachedAvailable = existsSync(GNU_TIME);
16 }
17
18 return cachedAvailable;
19}
20
21/**
22 * Wrap a shell command so GNU time writes its peak RSS (in KB) to `memFile`.

Callers 5

mainFunction · 0.90
runScenarioFunction · 0.90
runStepsPhaseFunction · 0.90
memory.test.tsFile · 0.90
wrapWithTimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected