( command: string, memFile: string, wrapInShell: boolean, )
| 41 | |
| 42 | // The pure wrapping (no availability check), split out for testing. |
| 43 | export function formatTimeCommand( |
| 44 | command: string, |
| 45 | memFile: string, |
| 46 | wrapInShell: boolean, |
| 47 | ): string { |
| 48 | const inner = wrapInShell ? `sh -c ${shellQuote(command)}` : command; |
| 49 | |
| 50 | return `${GNU_TIME} -o ${shellQuote(memFile)} -f %M ${inner}`; |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Read the peak RSS (rounded to MB) that {@link wrapWithTime} wrote to |
no test coverage detected