UNPKG

958 BTypeScriptView Raw
1export interface StrestConfig {
2 reporters: string[];
3 reportDirectory: string;
4}
5export declare const DEFAULT_CONFIG: StrestConfig;
6export declare type TimeInterval = {
7 timeToWait: number;
8};
9export declare type Execution = {
10 totalCount: number;
11 parallel: boolean;
12};
13export declare class ExecutionInstance {
14 arr: any[];
15 constructor();
16 getArr(): any[];
17 asString(): string;
18 waitTime(time: number): this;
19 runInstances(count: number, parallel?: boolean): this;
20}
21export declare const waitTime: (time: number) => ExecutionInstance;
22export declare const runInstances: (count: number, parallel?: boolean) => ExecutionInstance;
23export declare type InstanceOption = TimeInterval | Execution;
24export interface StressTestOptions {
25 name?: string;
26 instances: ExecutionInstance[];
27 repeat?: number;
28 stopOnError?: boolean;
29}
30export declare const StressTest: (options?: StressTestOptions) => (target: any) => void;