blob: 2620b4a9fbebb04d3a46352c413fccfc1f919711 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/// <reference types="node" />
import { ClientRequest, IncomingMessage } from 'http';
export interface Timings {
start: number;
socket?: number;
lookup?: number;
connect?: number;
secureConnect?: number;
upload?: number;
response?: number;
end?: number;
error?: number;
abort?: number;
phases: {
wait?: number;
dns?: number;
tcp?: number;
tls?: number;
request?: number;
firstByte?: number;
download?: number;
total?: number;
};
}
export interface ClientRequestWithTimings extends ClientRequest {
timings?: Timings;
}
export interface IncomingMessageWithTimings extends IncomingMessage {
timings?: Timings;
}
declare const timer: (request: ClientRequestWithTimings) => Timings;
export default timer;
|