Created
February 13, 2017 08:41
-
-
Save GregOnNet/fdc2b27b989f89742572b1e753315aef to your computer and use it in GitHub Desktop.
Typings for loadtest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare namespace loadtest { | |
export function loadTest(options: LoadTestOptions, err: Function): void; | |
export interface LoadTestOptions { | |
url: string; | |
concurrency?: number; | |
maxRequests?: number; | |
maxSeconds?: number; | |
timeOut?: number; | |
cookies?: string[]; | |
headers?: { [headerName: string]: string }; | |
method?: 'GET'|'POST'|'PUT'|'PATCH'|'DELETE'; | |
body?: string|Object; | |
contentType?: string; | |
requestsPerSecond?: number; | |
requestGenerator?(params: any, options: any, client: any, callback: Function); | |
agentKeepAlive?: boolean; | |
quiet?: boolean; | |
indexParam?: boolean; | |
insecure?: boolean; | |
secureProtocol?: string; | |
statusCallback?(latency: LoadTestResult, result: any, error: Error): void; | |
} | |
export interface LoadTestResult { | |
totalErrors: number, | |
totalRequests: number, | |
totalTimeSeconds: number, | |
percentiles: { [percentile: number]: number } | |
rps: number, | |
meanLatencyMs: number, | |
minLatencyMs: number, | |
maxLatencyMs: number, | |
errors: { [statusCode: string]: number } | |
} | |
} | |
export = loadtest; | |
export as namespace loadtest; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment