@loadstrike/loadstrike-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -0
- package/dist/cjs/cluster.js +410 -0
- package/dist/cjs/contracts.js +2 -0
- package/dist/cjs/correlation.js +1009 -0
- package/dist/cjs/index.js +71 -0
- package/dist/cjs/local.js +1884 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/reporting.js +1250 -0
- package/dist/cjs/runtime.js +7013 -0
- package/dist/cjs/sinks.js +2675 -0
- package/dist/cjs/transports.js +3695 -0
- package/dist/esm/cluster.js +403 -0
- package/dist/esm/contracts.js +1 -0
- package/dist/esm/correlation.js +999 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/local.js +1844 -0
- package/dist/esm/reporting.js +1241 -0
- package/dist/esm/runtime.js +6992 -0
- package/dist/esm/sinks.js +2657 -0
- package/dist/esm/transports.js +3658 -0
- package/dist/types/cluster.d.ts +112 -0
- package/dist/types/contracts.d.ts +439 -0
- package/dist/types/correlation.d.ts +234 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/local.d.ts +30 -0
- package/dist/types/reporting.d.ts +6 -0
- package/dist/types/runtime.d.ts +1052 -0
- package/dist/types/sinks.d.ts +497 -0
- package/dist/types/transports.d.ts +745 -0
- package/package.json +110 -0
|
@@ -0,0 +1,1052 @@
|
|
|
1
|
+
import type { LoadStrikeRunRequest } from "./contracts.js";
|
|
2
|
+
export declare const LoadStrikeNodeType: {
|
|
3
|
+
readonly SingleNode: "SingleNode";
|
|
4
|
+
readonly Coordinator: "Coordinator";
|
|
5
|
+
readonly Agent: "Agent";
|
|
6
|
+
};
|
|
7
|
+
export type LoadStrikeNodeType = typeof LoadStrikeNodeType[keyof typeof LoadStrikeNodeType];
|
|
8
|
+
type LoadStrikeNodeTypeInput = LoadStrikeNodeType | "Single";
|
|
9
|
+
export declare const LoadStrikeReportFormat: {
|
|
10
|
+
readonly Txt: "Txt";
|
|
11
|
+
readonly Html: "Html";
|
|
12
|
+
readonly Csv: "Csv";
|
|
13
|
+
readonly Md: "Md";
|
|
14
|
+
};
|
|
15
|
+
export type LoadStrikeReportFormat = typeof LoadStrikeReportFormat[keyof typeof LoadStrikeReportFormat] | Lowercase<typeof LoadStrikeReportFormat[keyof typeof LoadStrikeReportFormat]>;
|
|
16
|
+
export declare const LoadStrikeLogLevel: {
|
|
17
|
+
readonly Verbose: "Verbose";
|
|
18
|
+
readonly Debug: "Debug";
|
|
19
|
+
readonly Information: "Information";
|
|
20
|
+
readonly Warning: "Warning";
|
|
21
|
+
readonly Error: "Error";
|
|
22
|
+
readonly Fatal: "Fatal";
|
|
23
|
+
};
|
|
24
|
+
export type LoadStrikeLogLevel = typeof LoadStrikeLogLevel[keyof typeof LoadStrikeLogLevel];
|
|
25
|
+
export declare const LoadStrikeScenarioOperation: {
|
|
26
|
+
readonly Init: "Init";
|
|
27
|
+
readonly Clean: "Clean";
|
|
28
|
+
readonly WarmUp: "WarmUp";
|
|
29
|
+
readonly Bombing: "Bombing";
|
|
30
|
+
};
|
|
31
|
+
export type LoadStrikeScenarioOperation = typeof LoadStrikeScenarioOperation[keyof typeof LoadStrikeScenarioOperation];
|
|
32
|
+
export declare const LoadStrikeOperationType: {
|
|
33
|
+
readonly None: "None";
|
|
34
|
+
readonly Init: "Init";
|
|
35
|
+
readonly WarmUp: "WarmUp";
|
|
36
|
+
readonly Bombing: "Bombing";
|
|
37
|
+
readonly Stop: "Stop";
|
|
38
|
+
readonly Complete: "Complete";
|
|
39
|
+
readonly Error: "Error";
|
|
40
|
+
};
|
|
41
|
+
export type LoadStrikeOperationType = typeof LoadStrikeOperationType[keyof typeof LoadStrikeOperationType];
|
|
42
|
+
export type LoadStrikeLoadSimulation = Record<string, unknown>;
|
|
43
|
+
export type CrossPlatformTrackingConfiguration = Record<string, unknown>;
|
|
44
|
+
export interface LoadStrikeRandom {
|
|
45
|
+
next(): number;
|
|
46
|
+
next(maxValue: number): number;
|
|
47
|
+
next(minValue: number, maxValue: number): number;
|
|
48
|
+
Next(): number;
|
|
49
|
+
Next(maxValue: number): number;
|
|
50
|
+
Next(minValue: number, maxValue: number): number;
|
|
51
|
+
nextDouble(): number;
|
|
52
|
+
NextDouble(): number;
|
|
53
|
+
sample(): number;
|
|
54
|
+
Sample(): number;
|
|
55
|
+
nextBytes(length: number): Uint8Array;
|
|
56
|
+
NextBytes(length: number): Uint8Array;
|
|
57
|
+
}
|
|
58
|
+
export interface LoadStrikeStepReply<TPayload = unknown> {
|
|
59
|
+
isSuccess: boolean;
|
|
60
|
+
statusCode: string;
|
|
61
|
+
message: string;
|
|
62
|
+
sizeBytes: number;
|
|
63
|
+
customLatencyMs?: number;
|
|
64
|
+
payload?: TPayload;
|
|
65
|
+
asReply?: () => LoadStrikeStepReply;
|
|
66
|
+
AsReply?: () => LoadStrikeStepReply;
|
|
67
|
+
readonly IsError?: boolean;
|
|
68
|
+
readonly StatusCode?: string;
|
|
69
|
+
readonly Message?: string;
|
|
70
|
+
readonly SizeBytes?: number;
|
|
71
|
+
readonly CustomLatencyMs?: number;
|
|
72
|
+
readonly Payload?: TPayload;
|
|
73
|
+
}
|
|
74
|
+
export type LoadStrikeReply<TPayload = unknown> = LoadStrikeStepReply<TPayload>;
|
|
75
|
+
export interface LoadStrikeStepRuntime {
|
|
76
|
+
scenarioName: string;
|
|
77
|
+
stepName: string;
|
|
78
|
+
okCount: number;
|
|
79
|
+
failCount: number;
|
|
80
|
+
requestCount: number;
|
|
81
|
+
totalBytes: number;
|
|
82
|
+
totalLatencyMs: number;
|
|
83
|
+
avgLatencyMs: number;
|
|
84
|
+
minLatencyMs: number;
|
|
85
|
+
maxLatencyMs: number;
|
|
86
|
+
statusCodes: Record<string, number>;
|
|
87
|
+
}
|
|
88
|
+
export interface LoadStrikeScenarioRuntime {
|
|
89
|
+
scenarioName: string;
|
|
90
|
+
allRequestCount: number;
|
|
91
|
+
allOkCount: number;
|
|
92
|
+
allFailCount: number;
|
|
93
|
+
totalBytes: number;
|
|
94
|
+
totalLatencyMs: number;
|
|
95
|
+
avgLatencyMs: number;
|
|
96
|
+
minLatencyMs: number;
|
|
97
|
+
maxLatencyMs: number;
|
|
98
|
+
statusCodes: Record<string, number>;
|
|
99
|
+
}
|
|
100
|
+
export interface LoadStrikeMetricValue {
|
|
101
|
+
name: string;
|
|
102
|
+
type: "counter" | "gauge";
|
|
103
|
+
value: number;
|
|
104
|
+
scenarioName?: string;
|
|
105
|
+
unitOfMeasure?: string;
|
|
106
|
+
readonly Name?: string;
|
|
107
|
+
readonly Type?: "counter" | "gauge";
|
|
108
|
+
readonly Value?: number;
|
|
109
|
+
readonly ScenarioName?: string;
|
|
110
|
+
readonly UnitOfMeasure?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface LoadStrikeCounterStats {
|
|
113
|
+
metricName: string;
|
|
114
|
+
scenarioName: string;
|
|
115
|
+
unitOfMeasure: string;
|
|
116
|
+
value: number;
|
|
117
|
+
readonly MetricName?: string;
|
|
118
|
+
readonly ScenarioName?: string;
|
|
119
|
+
readonly UnitOfMeasure?: string;
|
|
120
|
+
readonly Value?: number;
|
|
121
|
+
}
|
|
122
|
+
export interface LoadStrikeGaugeStats {
|
|
123
|
+
metricName: string;
|
|
124
|
+
scenarioName: string;
|
|
125
|
+
unitOfMeasure: string;
|
|
126
|
+
value: number;
|
|
127
|
+
readonly MetricName?: string;
|
|
128
|
+
readonly ScenarioName?: string;
|
|
129
|
+
readonly UnitOfMeasure?: string;
|
|
130
|
+
readonly Value?: number;
|
|
131
|
+
}
|
|
132
|
+
export interface LoadStrikeMetricStats {
|
|
133
|
+
counters: LoadStrikeCounterStats[];
|
|
134
|
+
gauges: LoadStrikeGaugeStats[];
|
|
135
|
+
durationMs: number;
|
|
136
|
+
readonly Counters?: LoadStrikeCounterStats[];
|
|
137
|
+
readonly Gauges?: LoadStrikeGaugeStats[];
|
|
138
|
+
readonly DurationMs?: number;
|
|
139
|
+
readonly Duration?: number;
|
|
140
|
+
}
|
|
141
|
+
export interface LoadStrikeRequestStats {
|
|
142
|
+
count: number;
|
|
143
|
+
percent: number;
|
|
144
|
+
rps: number;
|
|
145
|
+
readonly Count?: number;
|
|
146
|
+
readonly Percent?: number;
|
|
147
|
+
readonly RPS?: number;
|
|
148
|
+
}
|
|
149
|
+
export interface LoadStrikeDataTransferStats {
|
|
150
|
+
allBytes: number;
|
|
151
|
+
maxBytes: number;
|
|
152
|
+
meanBytes: number;
|
|
153
|
+
minBytes: number;
|
|
154
|
+
percent50: number;
|
|
155
|
+
percent75: number;
|
|
156
|
+
percent95: number;
|
|
157
|
+
percent99: number;
|
|
158
|
+
stdDev: number;
|
|
159
|
+
readonly AllBytes?: number;
|
|
160
|
+
readonly MaxBytes?: number;
|
|
161
|
+
readonly MeanBytes?: number;
|
|
162
|
+
readonly MinBytes?: number;
|
|
163
|
+
readonly Percent50?: number;
|
|
164
|
+
readonly Percent75?: number;
|
|
165
|
+
readonly Percent95?: number;
|
|
166
|
+
readonly Percent99?: number;
|
|
167
|
+
readonly StdDev?: number;
|
|
168
|
+
}
|
|
169
|
+
export interface LoadStrikeLatencyCount {
|
|
170
|
+
lessOrEq800: number;
|
|
171
|
+
more800Less1200: number;
|
|
172
|
+
moreOrEq1200: number;
|
|
173
|
+
readonly LessOrEq800?: number;
|
|
174
|
+
readonly More800Less1200?: number;
|
|
175
|
+
readonly MoreOrEq1200?: number;
|
|
176
|
+
}
|
|
177
|
+
export interface LoadStrikeLatencyStats {
|
|
178
|
+
latencyCount: LoadStrikeLatencyCount;
|
|
179
|
+
maxMs: number;
|
|
180
|
+
meanMs: number;
|
|
181
|
+
minMs: number;
|
|
182
|
+
percent50: number;
|
|
183
|
+
percent75: number;
|
|
184
|
+
percent95: number;
|
|
185
|
+
percent99: number;
|
|
186
|
+
stdDev: number;
|
|
187
|
+
readonly LatencyCount?: LoadStrikeLatencyCount;
|
|
188
|
+
readonly MaxMs?: number;
|
|
189
|
+
readonly MeanMs?: number;
|
|
190
|
+
readonly MinMs?: number;
|
|
191
|
+
readonly Percent50?: number;
|
|
192
|
+
readonly Percent75?: number;
|
|
193
|
+
readonly Percent95?: number;
|
|
194
|
+
readonly Percent99?: number;
|
|
195
|
+
readonly StdDev?: number;
|
|
196
|
+
}
|
|
197
|
+
export interface LoadStrikeStatusCodeStats {
|
|
198
|
+
count: number;
|
|
199
|
+
isError: boolean;
|
|
200
|
+
message: string;
|
|
201
|
+
percent: number;
|
|
202
|
+
statusCode: string;
|
|
203
|
+
readonly Count?: number;
|
|
204
|
+
readonly IsError?: boolean;
|
|
205
|
+
readonly Message?: string;
|
|
206
|
+
readonly Percent?: number;
|
|
207
|
+
readonly StatusCode?: string;
|
|
208
|
+
}
|
|
209
|
+
export interface LoadStrikeMeasurementStats {
|
|
210
|
+
dataTransfer: LoadStrikeDataTransferStats;
|
|
211
|
+
latency: LoadStrikeLatencyStats;
|
|
212
|
+
request: LoadStrikeRequestStats;
|
|
213
|
+
statusCodes: LoadStrikeStatusCodeStats[];
|
|
214
|
+
readonly DataTransfer?: LoadStrikeDataTransferStats;
|
|
215
|
+
readonly Latency?: LoadStrikeLatencyStats;
|
|
216
|
+
readonly Request?: LoadStrikeRequestStats;
|
|
217
|
+
readonly StatusCodes?: LoadStrikeStatusCodeStats[];
|
|
218
|
+
}
|
|
219
|
+
export interface LoadStrikeLoadSimulationStats {
|
|
220
|
+
simulationName: string;
|
|
221
|
+
value: number;
|
|
222
|
+
readonly SimulationName?: string;
|
|
223
|
+
readonly Value?: number;
|
|
224
|
+
}
|
|
225
|
+
export interface LoadStrikeThresholdResult {
|
|
226
|
+
scenarioName: string;
|
|
227
|
+
scope: "scenario" | "step" | "metric";
|
|
228
|
+
stepName: string;
|
|
229
|
+
checkExpression: string;
|
|
230
|
+
isFailed: boolean;
|
|
231
|
+
errorCount: number;
|
|
232
|
+
exceptionMessage?: string;
|
|
233
|
+
readonly ScenarioName?: string;
|
|
234
|
+
readonly Scope?: "scenario" | "step" | "metric";
|
|
235
|
+
readonly StepName?: string;
|
|
236
|
+
readonly CheckExpression?: string;
|
|
237
|
+
readonly IsFailed?: boolean;
|
|
238
|
+
readonly ErrorCount?: number;
|
|
239
|
+
readonly ExceptionMessage?: string;
|
|
240
|
+
}
|
|
241
|
+
export declare class LoadStrikePluginDataTable {
|
|
242
|
+
tableName: string;
|
|
243
|
+
headers: string[];
|
|
244
|
+
rows: Array<Record<string, unknown>>;
|
|
245
|
+
constructor(tableName: string, headers?: string[], rows?: Array<Record<string, unknown>>);
|
|
246
|
+
static create(tableName: string): LoadStrikePluginDataTable;
|
|
247
|
+
static Create(tableName: string): LoadStrikePluginDataTable;
|
|
248
|
+
get TableName(): string;
|
|
249
|
+
get Headers(): string[];
|
|
250
|
+
get Rows(): Array<Record<string, unknown>>;
|
|
251
|
+
}
|
|
252
|
+
export declare class LoadStrikePluginData {
|
|
253
|
+
pluginName: string;
|
|
254
|
+
hints: string[];
|
|
255
|
+
tables: LoadStrikePluginDataTable[];
|
|
256
|
+
constructor(pluginName: string, tables?: LoadStrikePluginDataTable[], hints?: string[]);
|
|
257
|
+
static create(pluginName: string): LoadStrikePluginData;
|
|
258
|
+
static Create(pluginName: string): LoadStrikePluginData;
|
|
259
|
+
get PluginName(): string;
|
|
260
|
+
get Hints(): string[];
|
|
261
|
+
get Tables(): LoadStrikePluginDataTable[];
|
|
262
|
+
}
|
|
263
|
+
export declare class LoadStrikeReportData {
|
|
264
|
+
scenarioStats: LoadStrikeScenarioStats[];
|
|
265
|
+
constructor(scenarioStats?: LoadStrikeScenarioStats[]);
|
|
266
|
+
static create(...scenarioStats: LoadStrikeScenarioStats[]): LoadStrikeReportData;
|
|
267
|
+
static Create(...scenarioStats: LoadStrikeScenarioStats[]): LoadStrikeReportData;
|
|
268
|
+
static fromRunResult(result: LoadStrikeRunResult): LoadStrikeReportData;
|
|
269
|
+
findScenarioStats(scenarioName: string): LoadStrikeScenarioStats | undefined;
|
|
270
|
+
getScenarioStats(scenarioName: string): LoadStrikeScenarioStats;
|
|
271
|
+
FindScenarioStats(scenarioName: string): LoadStrikeScenarioStats | undefined;
|
|
272
|
+
GetScenarioStats(scenarioName: string): LoadStrikeScenarioStats;
|
|
273
|
+
get ScenarioStats(): LoadStrikeScenarioStats[];
|
|
274
|
+
}
|
|
275
|
+
export interface LoadStrikeRunResult {
|
|
276
|
+
startedUtc: string;
|
|
277
|
+
completedUtc: string;
|
|
278
|
+
allRequestCount: number;
|
|
279
|
+
allOkCount: number;
|
|
280
|
+
allFailCount: number;
|
|
281
|
+
failedThresholds: number;
|
|
282
|
+
nodeInfo: LoadStrikeNodeInfo;
|
|
283
|
+
testInfo: LoadStrikeTestInfo;
|
|
284
|
+
thresholdResults: LoadStrikeThresholdResult[];
|
|
285
|
+
metrics: LoadStrikeMetricValue[];
|
|
286
|
+
scenarioStats: LoadStrikeScenarioStats[];
|
|
287
|
+
stepStats: LoadStrikeStepStats[];
|
|
288
|
+
pluginsData: LoadStrikePluginData[];
|
|
289
|
+
disabledSinks: string[];
|
|
290
|
+
sinkErrors: LoadStrikeSinkError[];
|
|
291
|
+
reportFiles: string[];
|
|
292
|
+
readonly StartedUtc?: Date;
|
|
293
|
+
readonly CompletedUtc?: Date;
|
|
294
|
+
readonly AllRequestCount?: number;
|
|
295
|
+
readonly AllOkCount?: number;
|
|
296
|
+
readonly AllFailCount?: number;
|
|
297
|
+
readonly FailedThresholds?: number;
|
|
298
|
+
readonly NodeInfo?: LoadStrikeNodeInfo;
|
|
299
|
+
readonly TestInfo?: LoadStrikeTestInfo;
|
|
300
|
+
readonly ThresholdResults?: LoadStrikeThresholdResult[];
|
|
301
|
+
readonly Metrics?: LoadStrikeMetricValue[];
|
|
302
|
+
readonly ScenarioStats?: LoadStrikeScenarioStats[];
|
|
303
|
+
readonly StepStats?: LoadStrikeStepStats[];
|
|
304
|
+
readonly PluginsData?: LoadStrikePluginData[];
|
|
305
|
+
readonly DisabledSinks?: string[];
|
|
306
|
+
readonly SinkErrors?: LoadStrikeSinkError[];
|
|
307
|
+
readonly ReportFiles?: string[];
|
|
308
|
+
}
|
|
309
|
+
export interface LoadStrikeStepStats extends LoadStrikeStepRuntime {
|
|
310
|
+
ok: LoadStrikeMeasurementStats;
|
|
311
|
+
fail: LoadStrikeMeasurementStats;
|
|
312
|
+
sortIndex: number;
|
|
313
|
+
readonly ScenarioName?: string;
|
|
314
|
+
readonly StepName?: string;
|
|
315
|
+
readonly OkCount?: number;
|
|
316
|
+
readonly FailCount?: number;
|
|
317
|
+
readonly RequestCount?: number;
|
|
318
|
+
readonly TotalBytes?: number;
|
|
319
|
+
readonly TotalLatencyMs?: number;
|
|
320
|
+
readonly AvgLatencyMs?: number;
|
|
321
|
+
readonly MinLatencyMs?: number;
|
|
322
|
+
readonly MaxLatencyMs?: number;
|
|
323
|
+
readonly StatusCodes?: Record<string, number>;
|
|
324
|
+
readonly Ok?: LoadStrikeMeasurementStats;
|
|
325
|
+
readonly Fail?: LoadStrikeMeasurementStats;
|
|
326
|
+
readonly SortIndex?: number;
|
|
327
|
+
}
|
|
328
|
+
export interface LoadStrikeScenarioStats extends LoadStrikeScenarioRuntime {
|
|
329
|
+
allBytes: number;
|
|
330
|
+
currentOperation: "None" | "Init" | "WarmUp" | "Bombing" | "Stop" | "Complete" | "Error";
|
|
331
|
+
durationMs: number;
|
|
332
|
+
ok: LoadStrikeMeasurementStats;
|
|
333
|
+
fail: LoadStrikeMeasurementStats;
|
|
334
|
+
loadSimulationStats: LoadStrikeLoadSimulationStats;
|
|
335
|
+
sortIndex: number;
|
|
336
|
+
stepStats: LoadStrikeStepStats[];
|
|
337
|
+
findStepStats: (stepName: string) => LoadStrikeStepStats | undefined;
|
|
338
|
+
getStepStats: (stepName: string) => LoadStrikeStepStats;
|
|
339
|
+
FindStepStats: (stepName: string) => LoadStrikeStepStats | undefined;
|
|
340
|
+
GetStepStats: (stepName: string) => LoadStrikeStepStats;
|
|
341
|
+
readonly ScenarioName?: string;
|
|
342
|
+
readonly AllBytes?: number;
|
|
343
|
+
readonly AllRequestCount?: number;
|
|
344
|
+
readonly AllOkCount?: number;
|
|
345
|
+
readonly AllFailCount?: number;
|
|
346
|
+
readonly TotalBytes?: number;
|
|
347
|
+
readonly TotalLatencyMs?: number;
|
|
348
|
+
readonly AvgLatencyMs?: number;
|
|
349
|
+
readonly MinLatencyMs?: number;
|
|
350
|
+
readonly MaxLatencyMs?: number;
|
|
351
|
+
readonly StatusCodes?: Record<string, number>;
|
|
352
|
+
readonly CurrentOperation?: "None" | "Init" | "WarmUp" | "Bombing" | "Stop" | "Complete" | "Error";
|
|
353
|
+
readonly DurationMs?: number;
|
|
354
|
+
readonly Duration?: number;
|
|
355
|
+
readonly Ok?: LoadStrikeMeasurementStats;
|
|
356
|
+
readonly Fail?: LoadStrikeMeasurementStats;
|
|
357
|
+
readonly LoadSimulationStats?: LoadStrikeLoadSimulationStats;
|
|
358
|
+
readonly SortIndex?: number;
|
|
359
|
+
readonly StepStats?: LoadStrikeStepStats[];
|
|
360
|
+
}
|
|
361
|
+
export interface LoadStrikeNodeStats {
|
|
362
|
+
startedUtc: string;
|
|
363
|
+
completedUtc: string;
|
|
364
|
+
allBytes: number;
|
|
365
|
+
allRequestCount: number;
|
|
366
|
+
allOkCount: number;
|
|
367
|
+
allFailCount: number;
|
|
368
|
+
failedThresholds: number;
|
|
369
|
+
durationMs: number;
|
|
370
|
+
nodeInfo: LoadStrikeNodeInfo;
|
|
371
|
+
testInfo: LoadStrikeTestInfo;
|
|
372
|
+
thresholds: LoadStrikeThresholdResult[];
|
|
373
|
+
thresholdResults: LoadStrikeThresholdResult[];
|
|
374
|
+
metrics: LoadStrikeMetricStats;
|
|
375
|
+
metricValues: LoadStrikeMetricValue[];
|
|
376
|
+
scenarioStats: LoadStrikeScenarioStats[];
|
|
377
|
+
stepStats: LoadStrikeStepStats[];
|
|
378
|
+
pluginsData: LoadStrikePluginData[];
|
|
379
|
+
disabledSinks: string[];
|
|
380
|
+
sinkErrors: LoadStrikeSinkError[];
|
|
381
|
+
reportFiles: string[];
|
|
382
|
+
findScenarioStats: (scenarioName: string) => LoadStrikeScenarioStats | undefined;
|
|
383
|
+
getScenarioStats: (scenarioName: string) => LoadStrikeScenarioStats;
|
|
384
|
+
FindScenarioStats: (scenarioName: string) => LoadStrikeScenarioStats | undefined;
|
|
385
|
+
GetScenarioStats: (scenarioName: string) => LoadStrikeScenarioStats;
|
|
386
|
+
readonly StartedUtc?: Date;
|
|
387
|
+
readonly CompletedUtc?: Date;
|
|
388
|
+
readonly AllBytes?: number;
|
|
389
|
+
readonly AllRequestCount?: number;
|
|
390
|
+
readonly AllOkCount?: number;
|
|
391
|
+
readonly AllFailCount?: number;
|
|
392
|
+
readonly FailedThresholds?: number;
|
|
393
|
+
readonly DurationMs?: number;
|
|
394
|
+
readonly Duration?: number;
|
|
395
|
+
readonly NodeInfo?: LoadStrikeNodeInfo;
|
|
396
|
+
readonly TestInfo?: LoadStrikeTestInfo;
|
|
397
|
+
readonly Thresholds?: LoadStrikeThresholdResult[];
|
|
398
|
+
readonly ThresholdResults?: LoadStrikeThresholdResult[];
|
|
399
|
+
readonly Metrics?: LoadStrikeMetricStats;
|
|
400
|
+
readonly MetricValues?: LoadStrikeMetricValue[];
|
|
401
|
+
readonly ScenarioStats?: LoadStrikeScenarioStats[];
|
|
402
|
+
readonly StepStats?: LoadStrikeStepStats[];
|
|
403
|
+
readonly PluginsData?: LoadStrikePluginData[];
|
|
404
|
+
readonly DisabledSinks?: string[];
|
|
405
|
+
readonly SinkErrors?: LoadStrikeSinkError[];
|
|
406
|
+
readonly ReportFiles?: string[];
|
|
407
|
+
}
|
|
408
|
+
export interface LoadStrikeSinkError {
|
|
409
|
+
sinkName: string;
|
|
410
|
+
phase: "init" | "start" | "realtime" | "final" | "run-result" | "stop";
|
|
411
|
+
message: string;
|
|
412
|
+
attempts: number;
|
|
413
|
+
readonly SinkName?: string;
|
|
414
|
+
readonly Phase?: "init" | "start" | "realtime" | "final" | "stop";
|
|
415
|
+
readonly Message?: string;
|
|
416
|
+
readonly Attempts?: number;
|
|
417
|
+
}
|
|
418
|
+
export interface LoadStrikeSinkSession {
|
|
419
|
+
startedUtc: string;
|
|
420
|
+
scenarioNames: string[];
|
|
421
|
+
scenarios: LoadStrikeScenarioStartInfo[];
|
|
422
|
+
logger: LoadStrikeLogger;
|
|
423
|
+
nodeInfo: LoadStrikeNodeInfo;
|
|
424
|
+
testInfo: LoadStrikeTestInfo;
|
|
425
|
+
configPath?: string;
|
|
426
|
+
infraConfigPath?: string;
|
|
427
|
+
infraConfig?: Record<string, unknown>;
|
|
428
|
+
}
|
|
429
|
+
export interface LoadStrikeBaseContext {
|
|
430
|
+
logger: LoadStrikeLogger;
|
|
431
|
+
nodeInfo: LoadStrikeNodeInfo;
|
|
432
|
+
testInfo: LoadStrikeTestInfo;
|
|
433
|
+
getNodeInfo: () => LoadStrikeNodeInfo;
|
|
434
|
+
readonly Logger?: LoadStrikeLogger;
|
|
435
|
+
readonly NodeInfo?: LoadStrikeNodeInfo;
|
|
436
|
+
readonly TestInfo?: LoadStrikeTestInfo;
|
|
437
|
+
GetNodeInfo?: () => LoadStrikeNodeInfo;
|
|
438
|
+
}
|
|
439
|
+
export interface LoadStrikeSessionStartInfo extends LoadStrikeBaseContext {
|
|
440
|
+
startedUtc: string;
|
|
441
|
+
scenarioNames: string[];
|
|
442
|
+
scenarios: LoadStrikeScenarioStartInfo[];
|
|
443
|
+
readonly StartedUtc?: string;
|
|
444
|
+
readonly ScenarioNames?: string[];
|
|
445
|
+
readonly Scenarios?: LoadStrikeScenarioStartInfo[];
|
|
446
|
+
}
|
|
447
|
+
type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Omit<T, Keys> & {
|
|
448
|
+
[Key in Keys]-?: Required<Pick<T, Key>> & Partial<Pick<T, Exclude<Keys, Key>>>;
|
|
449
|
+
}[Keys];
|
|
450
|
+
export interface LoadStrikeReportingSink {
|
|
451
|
+
sinkName?: string;
|
|
452
|
+
SinkName?: string;
|
|
453
|
+
init?: (context: LoadStrikeBaseContext, infraConfig: Record<string, unknown>) => Promise<void> | void;
|
|
454
|
+
Init?: (context: LoadStrikeBaseContext, infraConfig: Record<string, unknown>) => Promise<void> | void;
|
|
455
|
+
start?: (session: LoadStrikeSessionStartInfo) => Promise<void> | void;
|
|
456
|
+
Start?: (session: LoadStrikeSessionStartInfo) => Promise<void> | void;
|
|
457
|
+
saveRealtimeStats?: (scenarioStats: LoadStrikeScenarioStats[]) => Promise<void> | void;
|
|
458
|
+
SaveRealtimeStats?: (scenarioStats: LoadStrikeScenarioStats[]) => Promise<void> | void;
|
|
459
|
+
saveRealtimeMetrics?: (metrics: LoadStrikeMetricStats) => Promise<void> | void;
|
|
460
|
+
SaveRealtimeMetrics?: (metrics: LoadStrikeMetricStats) => Promise<void> | void;
|
|
461
|
+
saveFinalStats?: (result: LoadStrikeNodeStats) => Promise<void> | void;
|
|
462
|
+
SaveFinalStats?: (result: LoadStrikeNodeStats) => Promise<void> | void;
|
|
463
|
+
saveRunResult?: (result: LoadStrikeRunResult) => Promise<void> | void;
|
|
464
|
+
SaveRunResult?: (result: LoadStrikeRunResult) => Promise<void> | void;
|
|
465
|
+
stop?: () => Promise<void> | void;
|
|
466
|
+
Stop?: () => Promise<void> | void;
|
|
467
|
+
dispose?: () => Promise<void> | void;
|
|
468
|
+
Dispose?: () => Promise<void> | void;
|
|
469
|
+
}
|
|
470
|
+
export type ILoadStrikeReportingSink = RequireAtLeastOne<LoadStrikeReportingSink, "sinkName" | "SinkName">;
|
|
471
|
+
export interface LoadStrikeRuntimePolicy {
|
|
472
|
+
shouldRunScenario?: (scenarioName: string) => boolean | Promise<boolean>;
|
|
473
|
+
beforeScenario?: (scenarioName: string) => Promise<void> | void;
|
|
474
|
+
afterScenario?: (scenarioName: string, stats: LoadStrikeScenarioRuntime) => Promise<void> | void;
|
|
475
|
+
beforeStep?: (scenarioName: string, stepName: string) => Promise<void> | void;
|
|
476
|
+
afterStep?: (scenarioName: string, stepName: string, reply: LoadStrikeStepReply) => Promise<void> | void;
|
|
477
|
+
}
|
|
478
|
+
export interface LoadStrikeWorkerPlugin {
|
|
479
|
+
pluginName?: string;
|
|
480
|
+
PluginName?: string;
|
|
481
|
+
init?: (context: LoadStrikeBaseContext, infraConfig: Record<string, unknown>) => Promise<void> | void;
|
|
482
|
+
Init?: (context: LoadStrikeBaseContext, infraConfig: Record<string, unknown>) => Promise<void> | void;
|
|
483
|
+
start?: (session: LoadStrikeSessionStartInfo) => Promise<void> | void;
|
|
484
|
+
Start?: (session: LoadStrikeSessionStartInfo) => Promise<void> | void;
|
|
485
|
+
stop?: () => Promise<void> | void;
|
|
486
|
+
Stop?: () => Promise<void> | void;
|
|
487
|
+
dispose?: () => Promise<void> | void;
|
|
488
|
+
Dispose?: () => Promise<void> | void;
|
|
489
|
+
getData?: (result: LoadStrikeNodeStats) => Promise<LoadStrikePluginData | null> | LoadStrikePluginData | null;
|
|
490
|
+
GetData?: (result: LoadStrikeNodeStats) => Promise<LoadStrikePluginData | null> | LoadStrikePluginData | null;
|
|
491
|
+
}
|
|
492
|
+
export type ILoadStrikeWorkerPlugin = RequireAtLeastOne<LoadStrikeWorkerPlugin, "pluginName" | "PluginName">;
|
|
493
|
+
export interface LoadStrikeRunnerOptions {
|
|
494
|
+
displayConsoleMetrics?: boolean;
|
|
495
|
+
nodeType?: LoadStrikeNodeTypeInput;
|
|
496
|
+
localDevClusterEnabled?: boolean;
|
|
497
|
+
agentGroup?: string;
|
|
498
|
+
agentsCount?: number;
|
|
499
|
+
targetScenarios?: string[];
|
|
500
|
+
agentTargetScenarios?: string[];
|
|
501
|
+
coordinatorTargetScenarios?: string[];
|
|
502
|
+
natsServerUrl?: string;
|
|
503
|
+
runnerKey?: string;
|
|
504
|
+
licenseValidationServerUrl?: string;
|
|
505
|
+
licenseValidationTimeoutSeconds?: number;
|
|
506
|
+
configPath?: string;
|
|
507
|
+
infraConfigPath?: string;
|
|
508
|
+
infraConfig?: Record<string, unknown>;
|
|
509
|
+
clusterId?: string;
|
|
510
|
+
sessionId?: string;
|
|
511
|
+
testSuite?: string;
|
|
512
|
+
testName?: string;
|
|
513
|
+
reportsEnabled?: boolean;
|
|
514
|
+
reportFolderPath?: string;
|
|
515
|
+
reportFileName?: string;
|
|
516
|
+
reportFormats?: Array<LoadStrikeReportFormat>;
|
|
517
|
+
reportFinalizer?: (reportData: LoadStrikeReportData) => LoadStrikeReportData;
|
|
518
|
+
detailedReportFinalizer?: (result: LoadStrikeRunResult) => LoadStrikeRunResult;
|
|
519
|
+
reportingIntervalSeconds?: number;
|
|
520
|
+
minimumLogLevel?: LoadStrikeLogLevel | string;
|
|
521
|
+
loggerConfig?: () => LoadStrikeLogger;
|
|
522
|
+
reportingSinks?: ILoadStrikeReportingSink[];
|
|
523
|
+
sinkRetryCount?: number;
|
|
524
|
+
sinkRetryBackoffMs?: number;
|
|
525
|
+
scenarioCompletionTimeoutSeconds?: number;
|
|
526
|
+
clusterCommandTimeoutSeconds?: number;
|
|
527
|
+
restartIterationMaxAttempts?: number;
|
|
528
|
+
customSettings?: Record<string, unknown>;
|
|
529
|
+
globalCustomSettings?: Record<string, unknown>;
|
|
530
|
+
runtimePolicies?: LoadStrikeRuntimePolicy[];
|
|
531
|
+
workerPlugins?: ILoadStrikeWorkerPlugin[];
|
|
532
|
+
runArgs?: string[];
|
|
533
|
+
}
|
|
534
|
+
export interface LoadStrikeThresholdOptions {
|
|
535
|
+
abortWhenErrorCount?: number;
|
|
536
|
+
startCheckAfterSeconds?: number;
|
|
537
|
+
}
|
|
538
|
+
export interface LoadStrikeThresholdPredicateContext {
|
|
539
|
+
scenarioName: string;
|
|
540
|
+
scope: "scenario" | "step" | "metric";
|
|
541
|
+
stepName: string;
|
|
542
|
+
checkExpression: string;
|
|
543
|
+
scenarioStats: LoadStrikeScenarioRuntime;
|
|
544
|
+
stepStats: LoadStrikeStepRuntime[];
|
|
545
|
+
runStats: {
|
|
546
|
+
allRequestCount: number;
|
|
547
|
+
allOkCount: number;
|
|
548
|
+
allFailCount: number;
|
|
549
|
+
durationMs: number;
|
|
550
|
+
};
|
|
551
|
+
metrics: Record<string, number>;
|
|
552
|
+
}
|
|
553
|
+
type LoadStrikeThresholdPredicate = (context: LoadStrikeThresholdPredicateContext) => boolean | Promise<boolean>;
|
|
554
|
+
export interface LoadStrikeScenarioPartition {
|
|
555
|
+
number: number;
|
|
556
|
+
count: number;
|
|
557
|
+
readonly Number?: number;
|
|
558
|
+
readonly Count?: number;
|
|
559
|
+
}
|
|
560
|
+
export interface LoadStrikeNodeInfo {
|
|
561
|
+
machineName: string;
|
|
562
|
+
nodeType: LoadStrikeNodeType;
|
|
563
|
+
engineVersion: string;
|
|
564
|
+
coresCount: number;
|
|
565
|
+
currentOperation: LoadStrikeOperationType;
|
|
566
|
+
dotNetVersion: string;
|
|
567
|
+
os: string;
|
|
568
|
+
processor: string;
|
|
569
|
+
readonly MachineName?: string;
|
|
570
|
+
readonly NodeType?: LoadStrikeNodeType;
|
|
571
|
+
readonly EngineVersion?: string;
|
|
572
|
+
readonly CoresCount?: number;
|
|
573
|
+
readonly CurrentOperation?: LoadStrikeOperationType;
|
|
574
|
+
readonly DotNetVersion?: string;
|
|
575
|
+
readonly OS?: string;
|
|
576
|
+
readonly Processor?: string;
|
|
577
|
+
}
|
|
578
|
+
export interface LoadStrikeTestInfo {
|
|
579
|
+
clusterId: string;
|
|
580
|
+
sessionId: string;
|
|
581
|
+
testSuite: string;
|
|
582
|
+
testName: string;
|
|
583
|
+
createdUtc: string;
|
|
584
|
+
readonly ClusterId?: string;
|
|
585
|
+
readonly SessionId?: string;
|
|
586
|
+
readonly TestSuite?: string;
|
|
587
|
+
readonly TestName?: string;
|
|
588
|
+
readonly CreatedUtc?: Date;
|
|
589
|
+
readonly Created?: Date;
|
|
590
|
+
}
|
|
591
|
+
export interface LoadStrikeScenarioInfo {
|
|
592
|
+
scenarioName: string;
|
|
593
|
+
instanceId: string;
|
|
594
|
+
instanceNumber: number;
|
|
595
|
+
scenarioOperation: "Init" | "Clean" | "WarmUp" | "Bombing";
|
|
596
|
+
scenarioDurationMs: number;
|
|
597
|
+
readonly ScenarioName?: string;
|
|
598
|
+
readonly InstanceId?: string;
|
|
599
|
+
readonly InstanceNumber?: number;
|
|
600
|
+
readonly ScenarioOperation?: "Init" | "Clean" | "WarmUp" | "Bombing";
|
|
601
|
+
readonly ScenarioDurationMs?: number;
|
|
602
|
+
readonly ScenarioDuration?: number;
|
|
603
|
+
}
|
|
604
|
+
export interface LoadStrikeScenarioStartInfo {
|
|
605
|
+
scenarioName: string;
|
|
606
|
+
sortIndex: number;
|
|
607
|
+
readonly ScenarioName?: string;
|
|
608
|
+
readonly SortIndex?: number;
|
|
609
|
+
}
|
|
610
|
+
export interface LoadStrikeLogger {
|
|
611
|
+
debug: (message: string) => void;
|
|
612
|
+
info: (message: string) => void;
|
|
613
|
+
warn: (message: string) => void;
|
|
614
|
+
error: (message: string) => void;
|
|
615
|
+
}
|
|
616
|
+
export interface LoadStrikeScenarioInitContext {
|
|
617
|
+
customSettings: Record<string, unknown>;
|
|
618
|
+
globalCustomSettings: Record<string, unknown>;
|
|
619
|
+
logger: LoadStrikeLogger;
|
|
620
|
+
nodeInfo: LoadStrikeNodeInfo;
|
|
621
|
+
testInfo: LoadStrikeTestInfo;
|
|
622
|
+
scenarioInfo: LoadStrikeScenarioInfo;
|
|
623
|
+
scenarioPartition: LoadStrikeScenarioPartition;
|
|
624
|
+
registerMetric: (metric: unknown) => void;
|
|
625
|
+
registeredMetrics: unknown[];
|
|
626
|
+
readonly CustomSettings?: Record<string, unknown>;
|
|
627
|
+
readonly GlobalCustomSettings?: Record<string, unknown>;
|
|
628
|
+
readonly Logger?: LoadStrikeLogger;
|
|
629
|
+
readonly NodeInfo?: LoadStrikeNodeInfo;
|
|
630
|
+
readonly TestInfo?: LoadStrikeTestInfo;
|
|
631
|
+
readonly ScenarioInfo?: LoadStrikeScenarioInfo;
|
|
632
|
+
readonly ScenarioPartition?: LoadStrikeScenarioPartition;
|
|
633
|
+
RegisterMetric?: (metric: unknown) => void;
|
|
634
|
+
readonly RegisteredMetrics?: unknown[];
|
|
635
|
+
}
|
|
636
|
+
export interface LoadStrikeScenarioContext {
|
|
637
|
+
data: Record<string, unknown>;
|
|
638
|
+
scenarioInstanceData: Record<string, unknown>;
|
|
639
|
+
invocationNumber: number;
|
|
640
|
+
logger: LoadStrikeLogger;
|
|
641
|
+
nodeInfo: LoadStrikeNodeInfo;
|
|
642
|
+
random: LoadStrikeRandom;
|
|
643
|
+
testInfo: LoadStrikeTestInfo;
|
|
644
|
+
scenarioInfo: LoadStrikeScenarioInfo;
|
|
645
|
+
scenarioCancellationToken: AbortSignal;
|
|
646
|
+
getScenarioTimerTime: () => number;
|
|
647
|
+
stopScenario: (scenarioNameOrReason?: string, reason?: string) => void;
|
|
648
|
+
stopCurrentTest: (reason?: string) => void;
|
|
649
|
+
readonly Data?: Record<string, unknown>;
|
|
650
|
+
readonly ScenarioInstanceData?: Record<string, unknown>;
|
|
651
|
+
readonly InvocationNumber?: number;
|
|
652
|
+
readonly Logger?: LoadStrikeLogger;
|
|
653
|
+
readonly NodeInfo?: LoadStrikeNodeInfo;
|
|
654
|
+
readonly Random?: LoadStrikeRandom;
|
|
655
|
+
readonly TestInfo?: LoadStrikeTestInfo;
|
|
656
|
+
readonly ScenarioInfo?: LoadStrikeScenarioInfo;
|
|
657
|
+
readonly ScenarioCancellationToken?: AbortSignal;
|
|
658
|
+
GetScenarioTimerTime?: () => number;
|
|
659
|
+
StopScenario?: (scenarioNameOrReason?: string, reason?: string) => void;
|
|
660
|
+
StopCurrentTest?: (reason?: string) => void;
|
|
661
|
+
}
|
|
662
|
+
export declare class LoadStrikeResponse {
|
|
663
|
+
static ok(statusCode?: string, sizeBytesOrMessage?: number | string, messageOrSizeBytes?: string | number, customLatencyMs?: number): LoadStrikeStepReply;
|
|
664
|
+
static ok<TPayload>(payload: TPayload, statusCode?: string, sizeBytesOrMessage?: number | string, messageOrSizeBytes?: string | number, customLatencyMs?: number): LoadStrikeStepReply<TPayload>;
|
|
665
|
+
static Ok(statusCode?: string, sizeBytesOrMessage?: number | string, messageOrSizeBytes?: string | number, customLatencyMs?: number): LoadStrikeStepReply;
|
|
666
|
+
static Ok<TPayload>(payload: TPayload, statusCode?: string, sizeBytesOrMessage?: number | string, messageOrSizeBytes?: string | number, customLatencyMs?: number): LoadStrikeStepReply<TPayload>;
|
|
667
|
+
static okWithPayload<TPayload>(payload: TPayload, statusCode?: string, sizeBytesOrMessage?: number | string, messageOrSizeBytes?: string | number, customLatencyMs?: number): LoadStrikeStepReply<TPayload>;
|
|
668
|
+
static OkWithPayload<TPayload>(payload: TPayload, statusCode?: string, sizeBytesOrMessage?: number | string, messageOrSizeBytes?: string | number, customLatencyMs?: number): LoadStrikeStepReply<TPayload>;
|
|
669
|
+
static fail(statusCode?: string, messageOrSizeBytes?: string | number, sizeBytesOrMessage?: number | string, customLatencyMs?: number): LoadStrikeStepReply;
|
|
670
|
+
static fail<TPayload>(payload: TPayload, statusCode?: string, messageOrSizeBytes?: string | number, sizeBytesOrMessage?: number | string, customLatencyMs?: number): LoadStrikeStepReply<TPayload>;
|
|
671
|
+
static Fail(statusCode?: string, messageOrSizeBytes?: string | number, sizeBytesOrMessage?: number | string, customLatencyMs?: number): LoadStrikeStepReply;
|
|
672
|
+
static Fail<TPayload>(payload: TPayload, statusCode?: string, messageOrSizeBytes?: string | number, sizeBytesOrMessage?: number | string, customLatencyMs?: number): LoadStrikeStepReply<TPayload>;
|
|
673
|
+
static failWithPayload<TPayload>(payload: TPayload, statusCode?: string, messageOrSizeBytes?: string | number, sizeBytesOrMessage?: number | string, customLatencyMs?: number): LoadStrikeStepReply<TPayload>;
|
|
674
|
+
static FailWithPayload<TPayload>(payload: TPayload, statusCode?: string, messageOrSizeBytes?: string | number, sizeBytesOrMessage?: number | string, customLatencyMs?: number): LoadStrikeStepReply<TPayload>;
|
|
675
|
+
}
|
|
676
|
+
export declare class LoadStrikeStep {
|
|
677
|
+
static run<TPayload = unknown>(stepName: string, context: LoadStrikeScenarioContext, run: () => Promise<LoadStrikeStepReply<TPayload>> | LoadStrikeStepReply<TPayload>): Promise<LoadStrikeStepReply<TPayload>>;
|
|
678
|
+
static Run<TPayload = unknown>(stepName: string, context: LoadStrikeScenarioContext, run: () => Promise<LoadStrikeStepReply<TPayload>> | LoadStrikeStepReply<TPayload>): Promise<LoadStrikeStepReply<TPayload>>;
|
|
679
|
+
}
|
|
680
|
+
export declare class LoadStrikeSimulation {
|
|
681
|
+
static inject(rate: number, intervalSeconds: number, duringSeconds: number): Record<string, unknown>;
|
|
682
|
+
static Inject(rate: number, intervalSeconds: number, duringSeconds: number): Record<string, unknown>;
|
|
683
|
+
static iterationsForConstant(copies: number, iterations: number): Record<string, unknown>;
|
|
684
|
+
static IterationsForConstant(copies: number, iterations: number): Record<string, unknown>;
|
|
685
|
+
static iterationsForInject(rate: number, intervalSeconds: number, iterations: number): Record<string, unknown>;
|
|
686
|
+
static IterationsForInject(rate: number, intervalSeconds: number, iterations: number): Record<string, unknown>;
|
|
687
|
+
static keepConstant(copies: number, duringSeconds: number): Record<string, unknown>;
|
|
688
|
+
static KeepConstant(copies: number, duringSeconds: number): Record<string, unknown>;
|
|
689
|
+
static injectRandom(minRate: number, maxRate: number, intervalSeconds: number, duringSeconds: number): Record<string, unknown>;
|
|
690
|
+
static InjectRandom(minRate: number, maxRate: number, intervalSeconds: number, duringSeconds: number): Record<string, unknown>;
|
|
691
|
+
static rampingInject(rate: number, intervalSeconds: number, duringSeconds: number): Record<string, unknown>;
|
|
692
|
+
static RampingInject(rate: number, intervalSeconds: number, duringSeconds: number): Record<string, unknown>;
|
|
693
|
+
static rampingConstant(copies: number, duringSeconds: number): Record<string, unknown>;
|
|
694
|
+
static RampingConstant(copies: number, duringSeconds: number): Record<string, unknown>;
|
|
695
|
+
static pause(duringSeconds: number): Record<string, unknown>;
|
|
696
|
+
static Pause(duringSeconds: number): Record<string, unknown>;
|
|
697
|
+
}
|
|
698
|
+
export declare class LoadStrikeCounter {
|
|
699
|
+
readonly type: "counter";
|
|
700
|
+
readonly name: string;
|
|
701
|
+
readonly unitOfMeasure: string;
|
|
702
|
+
private current;
|
|
703
|
+
constructor(name: string, initialValueOrUnit?: number | string, unitOfMeasure?: string);
|
|
704
|
+
add(value: number): number;
|
|
705
|
+
increment(by?: number): number;
|
|
706
|
+
value(): number;
|
|
707
|
+
Add(value: number): number;
|
|
708
|
+
Increment(by?: number): number;
|
|
709
|
+
get MetricName(): string;
|
|
710
|
+
get UnitOfMeasure(): string;
|
|
711
|
+
get Value(): number;
|
|
712
|
+
}
|
|
713
|
+
export declare class LoadStrikeGauge {
|
|
714
|
+
readonly type: "gauge";
|
|
715
|
+
readonly name: string;
|
|
716
|
+
readonly unitOfMeasure: string;
|
|
717
|
+
private current;
|
|
718
|
+
constructor(name: string, initialValueOrUnit?: number | string, unitOfMeasure?: string);
|
|
719
|
+
set(value: number): number;
|
|
720
|
+
add(value: number): number;
|
|
721
|
+
increment(by?: number): number;
|
|
722
|
+
decrement(by?: number): number;
|
|
723
|
+
value(): number;
|
|
724
|
+
Set(value: number): number;
|
|
725
|
+
Add(value: number): number;
|
|
726
|
+
Increment(by?: number): number;
|
|
727
|
+
Decrement(by?: number): number;
|
|
728
|
+
get MetricName(): string;
|
|
729
|
+
get UnitOfMeasure(): string;
|
|
730
|
+
get Value(): number;
|
|
731
|
+
}
|
|
732
|
+
export declare class LoadStrikeMetric {
|
|
733
|
+
static counter(name: string, initialValueOrUnit?: number | string, unitOfMeasure?: string): LoadStrikeCounter;
|
|
734
|
+
static gauge(name: string, initialValueOrUnit?: number | string, unitOfMeasure?: string): LoadStrikeGauge;
|
|
735
|
+
static Counter(name: string, initialValueOrUnit?: number | string, unitOfMeasure?: string): LoadStrikeCounter;
|
|
736
|
+
static Gauge(name: string, initialValueOrUnit?: number | string, unitOfMeasure?: string): LoadStrikeGauge;
|
|
737
|
+
static CreateCounter(name: string, unitOfMeasure?: string): LoadStrikeCounter;
|
|
738
|
+
static CreateGauge(name: string, unitOfMeasure?: string): LoadStrikeGauge;
|
|
739
|
+
}
|
|
740
|
+
export declare class LoadStrikeThreshold {
|
|
741
|
+
static scenario(field: string, operator: string, value: number, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
742
|
+
static step(stepName: string, field: string, operator: string, value: number, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
743
|
+
static metric(field: string, operator: string, value: number, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
744
|
+
static scenarioPredicate(checkExpression: string, predicate: LoadStrikeThresholdPredicate, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
745
|
+
static stepPredicate(stepName: string, checkExpression: string, predicate: LoadStrikeThresholdPredicate, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
746
|
+
static metricPredicate(checkExpression: string, predicate: LoadStrikeThresholdPredicate, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
747
|
+
static CreateScenario(predicate: LoadStrikeThresholdPredicate, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
748
|
+
static CreateScenario(predicate: LoadStrikeThresholdPredicate, abortWhenErrorCount?: number, startCheckAfterSeconds?: number): Record<string, unknown>;
|
|
749
|
+
static CreateStep(stepName: string, predicate: LoadStrikeThresholdPredicate, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
750
|
+
static CreateStep(stepName: string, predicate: LoadStrikeThresholdPredicate, abortWhenErrorCount?: number, startCheckAfterSeconds?: number): Record<string, unknown>;
|
|
751
|
+
static CreateMetric(predicate: LoadStrikeThresholdPredicate, options?: LoadStrikeThresholdOptions): Record<string, unknown>;
|
|
752
|
+
static CreateMetric(predicate: LoadStrikeThresholdPredicate, abortWhenErrorCount?: number, startCheckAfterSeconds?: number): Record<string, unknown>;
|
|
753
|
+
}
|
|
754
|
+
export declare class CrossPlatformScenarioConfigurator {
|
|
755
|
+
static configure(scenario: LoadStrikeScenario, configuration: Record<string, unknown>): LoadStrikeScenario;
|
|
756
|
+
static Configure(scenario: LoadStrikeScenario, configuration: Record<string, unknown>): LoadStrikeScenario;
|
|
757
|
+
}
|
|
758
|
+
export declare class ScenarioTrackingExtensions {
|
|
759
|
+
static ConfigureCrossPlatformTracking(scenario: LoadStrikeScenario, configuration: Record<string, unknown>): LoadStrikeScenario;
|
|
760
|
+
static WithCrossPlatformTracking(scenario: LoadStrikeScenario, configuration: Record<string, unknown>): LoadStrikeScenario;
|
|
761
|
+
}
|
|
762
|
+
export interface LoadStrikeRunContext {
|
|
763
|
+
ConsoleMetricsEnabled?: boolean;
|
|
764
|
+
LocalDevClusterEnabled?: boolean;
|
|
765
|
+
ConfigPath?: string;
|
|
766
|
+
InfraConfigPath?: string;
|
|
767
|
+
InfraConfig?: Record<string, unknown>;
|
|
768
|
+
AgentGroup?: string;
|
|
769
|
+
AgentsCount?: number;
|
|
770
|
+
AgentTargetScenarios?: string[];
|
|
771
|
+
ClusterId?: string;
|
|
772
|
+
CoordinatorTargetScenarios?: string[];
|
|
773
|
+
RunnerKey?: string;
|
|
774
|
+
LicenseValidationServerUrl?: string;
|
|
775
|
+
LicenseValidationTimeoutSeconds?: number;
|
|
776
|
+
MinimumLogLevel?: LoadStrikeLogLevel | string;
|
|
777
|
+
LoggerConfig?: () => LoadStrikeLogger;
|
|
778
|
+
NatsServerUrl?: string;
|
|
779
|
+
NodeType?: LoadStrikeNodeTypeInput;
|
|
780
|
+
ReportsEnabled?: boolean;
|
|
781
|
+
ReportFileName?: string;
|
|
782
|
+
ReportFolderPath?: string;
|
|
783
|
+
ReportFormats?: LoadStrikeReportFormat[];
|
|
784
|
+
ReportFinalizer?: (reportData: LoadStrikeReportData) => LoadStrikeReportData;
|
|
785
|
+
DetailedReportFinalizer?: (result: LoadStrikeRunResult) => LoadStrikeRunResult;
|
|
786
|
+
ReportingIntervalSeconds?: number;
|
|
787
|
+
ReportingSinks?: ILoadStrikeReportingSink[];
|
|
788
|
+
SinkRetryCount?: number;
|
|
789
|
+
SinkRetryBackoffMs?: number;
|
|
790
|
+
RuntimePolicies?: LoadStrikeRuntimePolicy[];
|
|
791
|
+
ScenarioCompletionTimeoutSeconds?: number;
|
|
792
|
+
ClusterCommandTimeoutSeconds?: number;
|
|
793
|
+
RestartIterationMaxAttempts?: number;
|
|
794
|
+
SessionId?: string;
|
|
795
|
+
TargetScenarios?: string[];
|
|
796
|
+
TestName?: string;
|
|
797
|
+
TestSuite?: string;
|
|
798
|
+
WorkerPlugins?: ILoadStrikeWorkerPlugin[];
|
|
799
|
+
CustomSettings?: Record<string, unknown>;
|
|
800
|
+
GlobalCustomSettings?: Record<string, unknown>;
|
|
801
|
+
}
|
|
802
|
+
export declare class LoadStrikeContext {
|
|
803
|
+
private values;
|
|
804
|
+
private registeredScenarios;
|
|
805
|
+
private runArgs;
|
|
806
|
+
constructor(values?: LoadStrikeRunContext, registeredScenarios?: LoadStrikeScenario[], runArgs?: string[]);
|
|
807
|
+
static create(): LoadStrikeContext;
|
|
808
|
+
toObject(): LoadStrikeRunContext;
|
|
809
|
+
buildContext(): LoadStrikeContext;
|
|
810
|
+
BuildContext(): LoadStrikeContext;
|
|
811
|
+
run(): Promise<LoadStrikeNodeStats>;
|
|
812
|
+
run(args: string[]): Promise<LoadStrikeNodeStats>;
|
|
813
|
+
run(...args: string[]): Promise<LoadStrikeNodeStats>;
|
|
814
|
+
runDetailed(): Promise<LoadStrikeRunResult>;
|
|
815
|
+
runDetailed(args: string[]): Promise<LoadStrikeRunResult>;
|
|
816
|
+
runDetailed(...args: string[]): Promise<LoadStrikeRunResult>;
|
|
817
|
+
Run(): Promise<LoadStrikeNodeStats>;
|
|
818
|
+
Run(args: string[]): Promise<LoadStrikeNodeStats>;
|
|
819
|
+
Run(...args: string[]): Promise<LoadStrikeNodeStats>;
|
|
820
|
+
RunDetailed(): Promise<LoadStrikeRunResult>;
|
|
821
|
+
RunDetailed(args: string[]): Promise<LoadStrikeRunResult>;
|
|
822
|
+
RunDetailed(...args: string[]): Promise<LoadStrikeRunResult>;
|
|
823
|
+
toRunnerOptions(): LoadStrikeRunnerOptions;
|
|
824
|
+
configure(configure: (context: LoadStrikeContext) => LoadStrikeContext): LoadStrikeContext;
|
|
825
|
+
configure(context: LoadStrikeContext | LoadStrikeRunContext): LoadStrikeContext;
|
|
826
|
+
configure(options: LoadStrikeRunnerOptions): LoadStrikeContext;
|
|
827
|
+
Configure(configure: (context: LoadStrikeContext) => LoadStrikeContext): LoadStrikeContext;
|
|
828
|
+
Configure(context: LoadStrikeContext | LoadStrikeRunContext): LoadStrikeContext;
|
|
829
|
+
Configure(options: LoadStrikeRunnerOptions): LoadStrikeContext;
|
|
830
|
+
configureContext(context: LoadStrikeContext | LoadStrikeRunContext): LoadStrikeContext;
|
|
831
|
+
ConfigureContext(context: LoadStrikeContext | LoadStrikeRunContext): LoadStrikeContext;
|
|
832
|
+
buildLicenseValidationPayload(): LoadStrikeRunRequest;
|
|
833
|
+
BuildLicenseValidationPayload(): LoadStrikeRunRequest;
|
|
834
|
+
displayConsoleMetrics(enable: boolean): LoadStrikeContext;
|
|
835
|
+
DisplayConsoleMetrics(enable: boolean): LoadStrikeContext;
|
|
836
|
+
enableLocalDevCluster(enable: boolean): LoadStrikeContext;
|
|
837
|
+
EnableLocalDevCluster(enable: boolean): LoadStrikeContext;
|
|
838
|
+
loadConfig(path: string): LoadStrikeContext;
|
|
839
|
+
LoadConfig(path: string): LoadStrikeContext;
|
|
840
|
+
loadInfraConfig(path: string): LoadStrikeContext;
|
|
841
|
+
LoadInfraConfig(path: string): LoadStrikeContext;
|
|
842
|
+
withAgentGroup(agentGroup: string): LoadStrikeContext;
|
|
843
|
+
WithAgentGroup(agentGroup: string): LoadStrikeContext;
|
|
844
|
+
withAgentsCount(agentsCount: number): LoadStrikeContext;
|
|
845
|
+
WithAgentsCount(agentsCount: number): LoadStrikeContext;
|
|
846
|
+
withTargetScenarios(...scenarioNames: string[]): LoadStrikeContext;
|
|
847
|
+
WithTargetScenarios(...scenarioNames: string[]): LoadStrikeContext;
|
|
848
|
+
withAgentTargetScenarios(...scenarioNames: string[]): LoadStrikeContext;
|
|
849
|
+
WithAgentTargetScenarios(...scenarioNames: string[]): LoadStrikeContext;
|
|
850
|
+
withCoordinatorTargetScenarios(...scenarioNames: string[]): LoadStrikeContext;
|
|
851
|
+
WithCoordinatorTargetScenarios(...scenarioNames: string[]): LoadStrikeContext;
|
|
852
|
+
withRunnerKey(runnerKey: string): LoadStrikeContext;
|
|
853
|
+
WithRunnerKey(runnerKey: string): LoadStrikeContext;
|
|
854
|
+
withLicenseValidationServerUrl(serverUrl: string): LoadStrikeContext;
|
|
855
|
+
WithLicenseValidationServerUrl(serverUrl: string): LoadStrikeContext;
|
|
856
|
+
withLicenseValidationTimeout(timeoutSeconds: number): LoadStrikeContext;
|
|
857
|
+
WithLicenseValidationTimeout(timeoutSeconds: number): LoadStrikeContext;
|
|
858
|
+
withNodeType(nodeType: LoadStrikeNodeTypeInput): LoadStrikeContext;
|
|
859
|
+
WithNodeType(nodeType: LoadStrikeNodeTypeInput): LoadStrikeContext;
|
|
860
|
+
withNatsServerUrl(natsUrl: string): LoadStrikeContext;
|
|
861
|
+
WithNatsServerUrl(natsUrl: string): LoadStrikeContext;
|
|
862
|
+
withoutReports(): LoadStrikeContext;
|
|
863
|
+
WithoutReports(): LoadStrikeContext;
|
|
864
|
+
withReportFileName(reportFileName: string): LoadStrikeContext;
|
|
865
|
+
WithReportFileName(reportFileName: string): LoadStrikeContext;
|
|
866
|
+
withReportFolder(reportFolderPath: string): LoadStrikeContext;
|
|
867
|
+
WithReportFolder(reportFolderPath: string): LoadStrikeContext;
|
|
868
|
+
withReportFormats(...reportFormats: Array<LoadStrikeReportFormat | string>): LoadStrikeContext;
|
|
869
|
+
WithReportFormats(...reportFormats: Array<LoadStrikeReportFormat | string>): LoadStrikeContext;
|
|
870
|
+
withReportFinalizer(handler: (reportData: LoadStrikeReportData) => LoadStrikeReportData): LoadStrikeContext;
|
|
871
|
+
WithReportFinalizer(handler: (reportData: LoadStrikeReportData) => LoadStrikeReportData): LoadStrikeContext;
|
|
872
|
+
withDetailedReportFinalizer(handler: (result: LoadStrikeRunResult) => LoadStrikeRunResult): LoadStrikeContext;
|
|
873
|
+
WithDetailedReportFinalizer(handler: (result: LoadStrikeRunResult) => LoadStrikeRunResult): LoadStrikeContext;
|
|
874
|
+
withReportingInterval(intervalSeconds: number): LoadStrikeContext;
|
|
875
|
+
WithReportingInterval(intervalSeconds: number): LoadStrikeContext;
|
|
876
|
+
withReportingSinks(...sinks: ILoadStrikeReportingSink[]): LoadStrikeContext;
|
|
877
|
+
WithReportingSinks(...sinks: ILoadStrikeReportingSink[]): LoadStrikeContext;
|
|
878
|
+
withWorkerPlugins(...plugins: ILoadStrikeWorkerPlugin[]): LoadStrikeContext;
|
|
879
|
+
WithWorkerPlugins(...plugins: ILoadStrikeWorkerPlugin[]): LoadStrikeContext;
|
|
880
|
+
withMinimumLogLevel(minimumLogLevel: LoadStrikeLogLevel | string): LoadStrikeContext;
|
|
881
|
+
WithMinimumLogLevel(minimumLogLevel: LoadStrikeLogLevel | string): LoadStrikeContext;
|
|
882
|
+
withLoggerConfig(loggerConfig: () => LoadStrikeLogger): LoadStrikeContext;
|
|
883
|
+
WithLoggerConfig(loggerConfig: () => LoadStrikeLogger): LoadStrikeContext;
|
|
884
|
+
withScenarioCompletionTimeout(timeoutSeconds: number): LoadStrikeContext;
|
|
885
|
+
WithScenarioCompletionTimeout(timeoutSeconds: number): LoadStrikeContext;
|
|
886
|
+
withClusterCommandTimeout(timeoutSeconds: number): LoadStrikeContext;
|
|
887
|
+
WithClusterCommandTimeout(timeoutSeconds: number): LoadStrikeContext;
|
|
888
|
+
withRestartIterationMaxAttempts(attempts: number): LoadStrikeContext;
|
|
889
|
+
WithRestartIterationMaxAttempts(attempts: number): LoadStrikeContext;
|
|
890
|
+
withSessionId(sessionId: string): LoadStrikeContext;
|
|
891
|
+
WithSessionId(sessionId: string): LoadStrikeContext;
|
|
892
|
+
withTestSuite(testSuite: string): LoadStrikeContext;
|
|
893
|
+
WithTestSuite(testSuite: string): LoadStrikeContext;
|
|
894
|
+
withTestName(testName: string): LoadStrikeContext;
|
|
895
|
+
WithTestName(testName: string): LoadStrikeContext;
|
|
896
|
+
withClusterId(clusterId: string): LoadStrikeContext;
|
|
897
|
+
WithClusterId(clusterId: string): LoadStrikeContext;
|
|
898
|
+
private mergeValues;
|
|
899
|
+
private assignState;
|
|
900
|
+
withRegisteredScenarios(...scenarios: LoadStrikeScenario[]): LoadStrikeContext;
|
|
901
|
+
}
|
|
902
|
+
export declare class LoadStrikeScenario {
|
|
903
|
+
readonly name: string;
|
|
904
|
+
private readonly runHandler;
|
|
905
|
+
private readonly initHandler?;
|
|
906
|
+
private readonly cleanHandler?;
|
|
907
|
+
private readonly loadSimulations;
|
|
908
|
+
private readonly thresholds;
|
|
909
|
+
private readonly trackingConfiguration?;
|
|
910
|
+
private readonly maxFailCount;
|
|
911
|
+
private readonly withoutWarmUpValue;
|
|
912
|
+
private readonly warmUpDurationSeconds;
|
|
913
|
+
private readonly weight;
|
|
914
|
+
private readonly restartIterationOnFail;
|
|
915
|
+
private readonly licenseFeatures;
|
|
916
|
+
private constructor();
|
|
917
|
+
static create(name: string, runHandler: (context: LoadStrikeScenarioContext) => Promise<LoadStrikeStepReply> | LoadStrikeStepReply): LoadStrikeScenario;
|
|
918
|
+
static Create(name: string, runHandler: (context: LoadStrikeScenarioContext) => Promise<LoadStrikeStepReply> | LoadStrikeStepReply): LoadStrikeScenario;
|
|
919
|
+
static empty(name: string): LoadStrikeScenario;
|
|
920
|
+
static Empty(name: string): LoadStrikeScenario;
|
|
921
|
+
get Name(): string;
|
|
922
|
+
withInit(handler: (context: LoadStrikeScenarioInitContext) => Promise<void> | void): LoadStrikeScenario;
|
|
923
|
+
withClean(handler: (context: LoadStrikeScenarioInitContext) => Promise<void> | void): LoadStrikeScenario;
|
|
924
|
+
withMaxFailCount(maxFailCount: number): LoadStrikeScenario;
|
|
925
|
+
withoutWarmUp(): LoadStrikeScenario;
|
|
926
|
+
withWarmUpDuration(durationSeconds: number): LoadStrikeScenario;
|
|
927
|
+
withWeight(weight: number): LoadStrikeScenario;
|
|
928
|
+
withRestartIterationOnFail(shouldRestart: boolean): LoadStrikeScenario;
|
|
929
|
+
withCrossPlatformTracking(configuration: Record<string, unknown>): LoadStrikeScenario;
|
|
930
|
+
withLoadSimulations(...simulations: Array<Record<string, unknown>>): LoadStrikeScenario;
|
|
931
|
+
withThresholds(...thresholds: Array<Record<string, unknown>>): LoadStrikeScenario;
|
|
932
|
+
withLicenseFeatures(...features: string[]): LoadStrikeScenario;
|
|
933
|
+
getSimulations(): Array<Record<string, unknown>>;
|
|
934
|
+
getThresholds(): Array<Record<string, unknown>>;
|
|
935
|
+
getTrackingConfiguration(): Record<string, unknown> | undefined;
|
|
936
|
+
getMaxFailCount(): number;
|
|
937
|
+
isWithoutWarmUp(): boolean;
|
|
938
|
+
getWarmUpDurationSeconds(): number;
|
|
939
|
+
getWeight(): number;
|
|
940
|
+
shouldRestartIterationOnFail(): boolean;
|
|
941
|
+
getLicenseFeatures(): string[];
|
|
942
|
+
invokeInit(context: LoadStrikeScenarioInitContext): Promise<void>;
|
|
943
|
+
invokeClean(context: LoadStrikeScenarioInitContext): Promise<void>;
|
|
944
|
+
execute(context: LoadStrikeScenarioContext): Promise<LoadStrikeStepReply>;
|
|
945
|
+
WithCrossPlatformTracking(configuration: Record<string, unknown>): LoadStrikeScenario;
|
|
946
|
+
WithInit(handler: (context: LoadStrikeScenarioInitContext) => Promise<void> | void): LoadStrikeScenario;
|
|
947
|
+
WithClean(handler: (context: LoadStrikeScenarioInitContext) => Promise<void> | void): LoadStrikeScenario;
|
|
948
|
+
WithLoadSimulations(...simulations: Array<Record<string, unknown>>): LoadStrikeScenario;
|
|
949
|
+
WithMaxFailCount(maxFailCount: number): LoadStrikeScenario;
|
|
950
|
+
WithoutWarmUp(): LoadStrikeScenario;
|
|
951
|
+
WithRestartIterationOnFail(shouldRestart: boolean): LoadStrikeScenario;
|
|
952
|
+
WithLicenseFeatures(...features: string[]): LoadStrikeScenario;
|
|
953
|
+
WithThresholds(...thresholds: Array<Record<string, unknown>>): LoadStrikeScenario;
|
|
954
|
+
WithWarmUpDuration(durationSeconds: number): LoadStrikeScenario;
|
|
955
|
+
WithWeight(weight: number): LoadStrikeScenario;
|
|
956
|
+
}
|
|
957
|
+
export declare class LoadStrikeRunner {
|
|
958
|
+
private scenarios;
|
|
959
|
+
private options;
|
|
960
|
+
private contextConfigurators;
|
|
961
|
+
private constructor();
|
|
962
|
+
static create(): LoadStrikeRunner;
|
|
963
|
+
static Create(): LoadStrikeRunner;
|
|
964
|
+
static registerScenarios(...scenarios: LoadStrikeScenario[]): LoadStrikeContext;
|
|
965
|
+
static RegisterScenarios(...scenarios: LoadStrikeScenario[]): LoadStrikeContext;
|
|
966
|
+
static DisplayConsoleMetrics(context: LoadStrikeContext, enable: boolean): LoadStrikeContext;
|
|
967
|
+
static EnableLocalDevCluster(context: LoadStrikeContext, enable: boolean): LoadStrikeContext;
|
|
968
|
+
static LoadConfig(context: LoadStrikeContext, path: string): LoadStrikeContext;
|
|
969
|
+
static LoadInfraConfig(context: LoadStrikeContext, path: string): LoadStrikeContext;
|
|
970
|
+
static Run(context: LoadStrikeContext, ...args: string[]): Promise<LoadStrikeNodeStats>;
|
|
971
|
+
static WithAgentGroup(context: LoadStrikeContext, agentGroup: string): LoadStrikeContext;
|
|
972
|
+
static WithAgentsCount(context: LoadStrikeContext, agentsCount: number): LoadStrikeContext;
|
|
973
|
+
static WithAgentTargetScenarios(context: LoadStrikeContext, ...scenarioNames: string[]): LoadStrikeContext;
|
|
974
|
+
static WithClusterId(context: LoadStrikeContext, clusterId: string): LoadStrikeContext;
|
|
975
|
+
static WithCoordinatorTargetScenarios(context: LoadStrikeContext, ...scenarioNames: string[]): LoadStrikeContext;
|
|
976
|
+
static WithRunnerKey(context: LoadStrikeContext, runnerKey: string): LoadStrikeContext;
|
|
977
|
+
static WithLicenseValidationServerUrl(context: LoadStrikeContext, serverUrl: string): LoadStrikeContext;
|
|
978
|
+
static WithLicenseValidationTimeout(context: LoadStrikeContext, timeoutSeconds: number): LoadStrikeContext;
|
|
979
|
+
static WithLoggerConfig(context: LoadStrikeContext, loggerConfig: () => LoadStrikeLogger): LoadStrikeContext;
|
|
980
|
+
static WithMinimumLogLevel(context: LoadStrikeContext, minimumLogLevel: LoadStrikeLogLevel | string): LoadStrikeContext;
|
|
981
|
+
static WithNatsServerUrl(context: LoadStrikeContext, natsUrl: string): LoadStrikeContext;
|
|
982
|
+
static WithNodeType(context: LoadStrikeContext, nodeType: LoadStrikeNodeTypeInput): LoadStrikeContext;
|
|
983
|
+
static WithoutReports(context: LoadStrikeContext): LoadStrikeContext;
|
|
984
|
+
static WithReportFileName(context: LoadStrikeContext, reportFileName: string): LoadStrikeContext;
|
|
985
|
+
static WithReportFinalizer(context: LoadStrikeContext, handler: (reportData: LoadStrikeReportData) => LoadStrikeReportData): LoadStrikeContext;
|
|
986
|
+
static WithDetailedReportFinalizer(context: LoadStrikeContext, handler: (result: LoadStrikeRunResult) => LoadStrikeRunResult): LoadStrikeContext;
|
|
987
|
+
static WithReportFolder(context: LoadStrikeContext, reportFolderPath: string): LoadStrikeContext;
|
|
988
|
+
static WithReportFormats(context: LoadStrikeContext, ...reportFormats: Array<LoadStrikeReportFormat | string>): LoadStrikeContext;
|
|
989
|
+
static WithReportingInterval(context: LoadStrikeContext, intervalSeconds: number): LoadStrikeContext;
|
|
990
|
+
static WithReportingSinks(context: LoadStrikeContext, ...sinks: ILoadStrikeReportingSink[]): LoadStrikeContext;
|
|
991
|
+
static WithScenarioCompletionTimeout(context: LoadStrikeContext, timeoutSeconds: number): LoadStrikeContext;
|
|
992
|
+
static WithClusterCommandTimeout(context: LoadStrikeContext, timeoutSeconds: number): LoadStrikeContext;
|
|
993
|
+
static WithRestartIterationMaxAttempts(context: LoadStrikeContext, attempts: number): LoadStrikeContext;
|
|
994
|
+
static WithSessionId(context: LoadStrikeContext, sessionId: string): LoadStrikeContext;
|
|
995
|
+
static WithTargetScenarios(context: LoadStrikeContext, ...scenarioNames: string[]): LoadStrikeContext;
|
|
996
|
+
static WithTestName(context: LoadStrikeContext, testName: string): LoadStrikeContext;
|
|
997
|
+
static WithTestSuite(context: LoadStrikeContext, testSuite: string): LoadStrikeContext;
|
|
998
|
+
static WithWorkerPlugins(context: LoadStrikeContext, ...plugins: ILoadStrikeWorkerPlugin[]): LoadStrikeContext;
|
|
999
|
+
addScenario(scenario: LoadStrikeScenario): LoadStrikeRunner;
|
|
1000
|
+
AddScenario(scenario: LoadStrikeScenario): LoadStrikeRunner;
|
|
1001
|
+
addScenarios(...scenarios: LoadStrikeScenario[]): LoadStrikeRunner;
|
|
1002
|
+
AddScenarios(...scenarios: LoadStrikeScenario[]): LoadStrikeRunner;
|
|
1003
|
+
configure(options: LoadStrikeRunnerOptions): LoadStrikeRunner;
|
|
1004
|
+
Configure(configure: (context: LoadStrikeContext) => LoadStrikeContext): LoadStrikeRunner;
|
|
1005
|
+
Configure(context: LoadStrikeContext | LoadStrikeRunContext): LoadStrikeRunner;
|
|
1006
|
+
Configure(options: LoadStrikeRunnerOptions): LoadStrikeRunner;
|
|
1007
|
+
configureContext(context: LoadStrikeContext | LoadStrikeRunContext): LoadStrikeRunner;
|
|
1008
|
+
ConfigureContext(context: LoadStrikeContext | LoadStrikeRunContext): LoadStrikeRunner;
|
|
1009
|
+
withTestSuite(testSuite: string): LoadStrikeRunner;
|
|
1010
|
+
WithTestSuite(testSuite: string): LoadStrikeRunner;
|
|
1011
|
+
withTestName(testName: string): LoadStrikeRunner;
|
|
1012
|
+
WithTestName(testName: string): LoadStrikeRunner;
|
|
1013
|
+
withSessionId(sessionId: string): LoadStrikeRunner;
|
|
1014
|
+
WithSessionId(sessionId: string): LoadStrikeRunner;
|
|
1015
|
+
withReportFolder(reportFolderPath: string): LoadStrikeRunner;
|
|
1016
|
+
WithReportFolder(reportFolderPath: string): LoadStrikeRunner;
|
|
1017
|
+
withReportingInterval(intervalSeconds: number): LoadStrikeRunner;
|
|
1018
|
+
WithReportingInterval(intervalSeconds: number): LoadStrikeRunner;
|
|
1019
|
+
withClusterCommandTimeout(timeoutSeconds: number): LoadStrikeRunner;
|
|
1020
|
+
WithClusterCommandTimeout(timeoutSeconds: number): LoadStrikeRunner;
|
|
1021
|
+
withRestartIterationMaxAttempts(attempts: number): LoadStrikeRunner;
|
|
1022
|
+
WithRestartIterationMaxAttempts(attempts: number): LoadStrikeRunner;
|
|
1023
|
+
withoutReports(): LoadStrikeRunner;
|
|
1024
|
+
WithoutReports(): LoadStrikeRunner;
|
|
1025
|
+
buildContext(): LoadStrikeContext;
|
|
1026
|
+
BuildContext(): LoadStrikeContext;
|
|
1027
|
+
run(args?: string[]): Promise<LoadStrikeNodeStats>;
|
|
1028
|
+
runDetailed(args?: string[]): Promise<LoadStrikeRunResult>;
|
|
1029
|
+
Run(args?: string[]): Promise<LoadStrikeNodeStats>;
|
|
1030
|
+
RunDetailed(args?: string[]): Promise<LoadStrikeRunResult>;
|
|
1031
|
+
private filterScenariosWithPolicies;
|
|
1032
|
+
private runClusterChildNode;
|
|
1033
|
+
private runCoordinatorWithLocalAgents;
|
|
1034
|
+
private runCoordinatorWithNats;
|
|
1035
|
+
private runAgentWithNats;
|
|
1036
|
+
private stopPlugins;
|
|
1037
|
+
private executeScenarioInvocation;
|
|
1038
|
+
private selectScenarios;
|
|
1039
|
+
private buildLicenseValidationPayload;
|
|
1040
|
+
private initializeSinks;
|
|
1041
|
+
private startSinks;
|
|
1042
|
+
private emitRealtimeStats;
|
|
1043
|
+
private emitFinalStats;
|
|
1044
|
+
private stopSinks;
|
|
1045
|
+
private emitRunResult;
|
|
1046
|
+
private invokeSinkAction;
|
|
1047
|
+
private invokeBeforeScenario;
|
|
1048
|
+
private invokeAfterScenario;
|
|
1049
|
+
private writeReports;
|
|
1050
|
+
private collectPluginData;
|
|
1051
|
+
}
|
|
1052
|
+
export {};
|