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

Function wrapWithTime

scripts/benchmark/helpers/memory.ts:30–40  ·  view source on GitHub ↗
(
  command: string,
  memFile: string,
  wrapInShell: boolean,
)

Source from the content-addressed store, hash-verified

28 * needs no inner shell.
29 */
30export function wrapWithTime(
31 command: string,
32 memFile: string,
33 wrapInShell: boolean,
34): string {
35 if (!gnuTimeAvailable()) {
36 return command;
37 }
38
39 return formatTimeCommand(command, memFile, wrapInShell);
40}
41
42// The pure wrapping (no availability check), split out for testing.
43export function formatTimeCommand(

Callers 3

runStepsPhaseFunction · 0.90
runBenchmarkFunction · 0.90
memory.test.tsFile · 0.90

Calls 2

gnuTimeAvailableFunction · 0.85
formatTimeCommandFunction · 0.85

Tested by

no test coverage detected