( command: string, outFile: string, wrapInShell: boolean, )
| 46 | * needs no inner shell. |
| 47 | */ |
| 48 | export function wrapWithTime( |
| 49 | command: string, |
| 50 | outFile: string, |
| 51 | wrapInShell: boolean, |
| 52 | ): string { |
| 53 | const inner = wrapInShell ? `sh -c ${shellQuote(command)}` : command; |
| 54 | |
| 55 | return `${GNU_TIME} -o ${shellQuote(outFile)} -f '%U %S %M' ${inner}`; |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * Read the measurement line that {@link wrapWithTime} wrote to `outFile`: |
no test coverage detected