UNPKG

958 BTypeScriptView Raw
1import { CloseEvent, Command } from '../command';
2import { Logger } from '../logger';
3import { FlowController } from './flow-controller';
4type TimingInfo = {
5 name: string;
6 duration: string;
7 'exit code': string | number;
8 killed: boolean;
9 command: string;
10};
11/**
12 * Logs timing information about commands as they start/stop and then a summary when all commands finish.
13 */
14export declare class LogTimings implements FlowController {
15 static mapCloseEventToTimingInfo({ command, timings, killed, exitCode, }: CloseEvent): TimingInfo;
16 private readonly logger?;
17 private readonly timestampFormat;
18 constructor({ logger, timestampFormat, }: {
19 logger?: Logger;
20 timestampFormat?: string;
21 });
22 private printExitInfoTimingTable;
23 handle(commands: Command[]): {
24 commands: Command[];
25 onFinish?: undefined;
26 } | {
27 commands: Command[];
28 onFinish: () => void;
29 };
30}
31export {};