@loadstrike/loadstrike-sdk 1.0.20801 → 1.0.21101
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/dist/cjs/cluster.js +27 -2
- package/dist/cjs/correlation.js +132 -0
- package/dist/cjs/local.js +113 -6
- package/dist/cjs/reporting.js +12 -0
- package/dist/cjs/runtime.js +929 -14
- package/dist/esm/cluster.js +27 -2
- package/dist/esm/correlation.js +132 -0
- package/dist/esm/local.js +113 -6
- package/dist/esm/reporting.js +12 -0
- package/dist/esm/runtime.js +929 -14
- package/dist/types/cluster.d.ts +21 -1
- package/dist/types/correlation.d.ts +132 -0
- package/dist/types/local.d.ts +6 -0
- package/dist/types/reporting.d.ts +12 -0
- package/dist/types/runtime.d.ts +868 -0
- package/package.json +1 -1
package/dist/types/runtime.d.ts
CHANGED
|
@@ -244,8 +244,20 @@ export declare class LoadStrikePluginDataTable {
|
|
|
244
244
|
tableName: string;
|
|
245
245
|
headers: string[];
|
|
246
246
|
rows: Array<Record<string, unknown>>;
|
|
247
|
+
/**
|
|
248
|
+
* Exposes the public constructor operation.
|
|
249
|
+
* Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
|
|
250
|
+
*/
|
|
247
251
|
constructor(tableName: string, headers?: string[], rows?: Array<Record<string, unknown>>);
|
|
252
|
+
/**
|
|
253
|
+
* Creates a new instance of this public SDK type.
|
|
254
|
+
* Use this when you are starting a run definition from scratch.
|
|
255
|
+
*/
|
|
248
256
|
static create(tableName: string): LoadStrikePluginDataTable;
|
|
257
|
+
/**
|
|
258
|
+
* Creates a new instance of this public SDK type.
|
|
259
|
+
* Use this when you are starting a run definition from scratch.
|
|
260
|
+
*/
|
|
249
261
|
static Create(tableName: string): LoadStrikePluginDataTable;
|
|
250
262
|
get TableName(): string;
|
|
251
263
|
get Headers(): string[];
|
|
@@ -255,8 +267,20 @@ export declare class LoadStrikePluginData {
|
|
|
255
267
|
pluginName: string;
|
|
256
268
|
hints: string[];
|
|
257
269
|
tables: LoadStrikePluginDataTable[];
|
|
270
|
+
/**
|
|
271
|
+
* Exposes the public constructor operation.
|
|
272
|
+
* Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
|
|
273
|
+
*/
|
|
258
274
|
constructor(pluginName: string, tables?: LoadStrikePluginDataTable[], hints?: string[]);
|
|
275
|
+
/**
|
|
276
|
+
* Creates a new instance of this public SDK type.
|
|
277
|
+
* Use this when you are starting a run definition from scratch.
|
|
278
|
+
*/
|
|
259
279
|
static create(pluginName: string): LoadStrikePluginData;
|
|
280
|
+
/**
|
|
281
|
+
* Creates a new instance of this public SDK type.
|
|
282
|
+
* Use this when you are starting a run definition from scratch.
|
|
283
|
+
*/
|
|
260
284
|
static Create(pluginName: string): LoadStrikePluginData;
|
|
261
285
|
get PluginName(): string;
|
|
262
286
|
get Hints(): string[];
|
|
@@ -427,7 +451,15 @@ declare class MeasurementAccumulator {
|
|
|
427
451
|
private readonly sizesBytes;
|
|
428
452
|
private readonly statusCodes;
|
|
429
453
|
get Count(): number;
|
|
454
|
+
/**
|
|
455
|
+
* Exposes the public record operation.
|
|
456
|
+
* Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
|
|
457
|
+
*/
|
|
430
458
|
record(reply: LoadStrikeStepReply, observedLatencyMs: number): void;
|
|
459
|
+
/**
|
|
460
|
+
* Builds the configured payload or helper object.
|
|
461
|
+
* Use this when all builder inputs are ready to be materialized.
|
|
462
|
+
*/
|
|
431
463
|
build(allRequestCount: number, durationMs: number): LoadStrikeMeasurementStats;
|
|
432
464
|
}
|
|
433
465
|
declare class StepStatsAccumulator {
|
|
@@ -437,7 +469,15 @@ declare class StepStatsAccumulator {
|
|
|
437
469
|
readonly ok: MeasurementAccumulator;
|
|
438
470
|
readonly fail: MeasurementAccumulator;
|
|
439
471
|
constructor(scenarioName: string, stepName: string, sortIndex: number);
|
|
472
|
+
/**
|
|
473
|
+
* Exposes the public record operation.
|
|
474
|
+
* Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
|
|
475
|
+
*/
|
|
440
476
|
record(reply: LoadStrikeStepReply, observedLatencyMs: number): void;
|
|
477
|
+
/**
|
|
478
|
+
* Builds the configured payload or helper object.
|
|
479
|
+
* Use this when all builder inputs are ready to be materialized.
|
|
480
|
+
*/
|
|
441
481
|
build(allScenarioRequestCount: number, durationMs: number): LoadStrikeStepStats;
|
|
442
482
|
}
|
|
443
483
|
declare class ScenarioStatsAccumulator {
|
|
@@ -450,11 +490,35 @@ declare class ScenarioStatsAccumulator {
|
|
|
450
490
|
private loadSimulationStats;
|
|
451
491
|
private currentOperation;
|
|
452
492
|
constructor(scenarioName: string, sortIndex: number);
|
|
493
|
+
/**
|
|
494
|
+
* Exposes the public setLoadSimulation operation.
|
|
495
|
+
* Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
|
|
496
|
+
*/
|
|
453
497
|
setLoadSimulation(simulationName: string, value: number): void;
|
|
498
|
+
/**
|
|
499
|
+
* Exposes the public setCurrentOperation operation.
|
|
500
|
+
* Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
|
|
501
|
+
*/
|
|
454
502
|
setCurrentOperation(operation: LoadStrikeScenarioStats["currentOperation"]): void;
|
|
503
|
+
/**
|
|
504
|
+
* Returns current operation.
|
|
505
|
+
* Use this when current operation is required for branching, logging, or assertions.
|
|
506
|
+
*/
|
|
455
507
|
getCurrentOperation(): LoadStrikeScenarioStats["currentOperation"];
|
|
508
|
+
/**
|
|
509
|
+
* Exposes the public recordScenario operation.
|
|
510
|
+
* Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
|
|
511
|
+
*/
|
|
456
512
|
recordScenario(reply: LoadStrikeStepReply, observedLatencyMs: number): void;
|
|
513
|
+
/**
|
|
514
|
+
* Exposes the public recordStep operation.
|
|
515
|
+
* Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
|
|
516
|
+
*/
|
|
457
517
|
recordStep(stepName: string, reply: LoadStrikeStepReply, observedLatencyMs: number): void;
|
|
518
|
+
/**
|
|
519
|
+
* Builds the configured payload or helper object.
|
|
520
|
+
* Use this when all builder inputs are ready to be materialized.
|
|
521
|
+
*/
|
|
458
522
|
build(durationMs: number): LoadStrikeScenarioStats;
|
|
459
523
|
}
|
|
460
524
|
export interface LoadStrikeSinkError {
|
|
@@ -593,6 +657,8 @@ export interface LoadStrikeRunnerOptions {
|
|
|
593
657
|
runtimePolicies?: LoadStrikeRuntimePolicy[];
|
|
594
658
|
workerPlugins?: ILoadStrikeWorkerPlugin[];
|
|
595
659
|
runArgs?: string[];
|
|
660
|
+
agentExecutionToken?: string;
|
|
661
|
+
agentCommandId?: string;
|
|
596
662
|
}
|
|
597
663
|
export interface LoadStrikeThresholdOptions {
|
|
598
664
|
abortWhenErrorCount?: number;
|
|
@@ -751,21 +817,85 @@ export declare class LoadStrikeStep {
|
|
|
751
817
|
static RunAsync<TPayload = unknown>(stepName: string, context: LoadStrikeScenarioContext, run: () => Promise<LoadStrikeReply<TPayload>> | LoadStrikeReply<TPayload>): Promise<LoadStrikeReply<TPayload>>;
|
|
752
818
|
}
|
|
753
819
|
export declare class LoadStrikeSimulation {
|
|
820
|
+
/**
|
|
821
|
+
* Builds a constant injection load shape.
|
|
822
|
+
* Use this when requests should be injected at a fixed rate over a duration.
|
|
823
|
+
*/
|
|
754
824
|
static inject(rate: number, intervalSeconds: number, duringSeconds: number): Record<string, unknown>;
|
|
825
|
+
/**
|
|
826
|
+
* Builds a constant injection load shape.
|
|
827
|
+
* Use this when requests should be injected at a fixed rate over a duration.
|
|
828
|
+
*/
|
|
755
829
|
static Inject(rate: number, intervalSeconds: number, duringSeconds: number): Record<string, unknown>;
|
|
830
|
+
/**
|
|
831
|
+
* Builds an iteration-limited constant-concurrency load shape.
|
|
832
|
+
* Use this when a fixed number of iterations should be shared across constant workers.
|
|
833
|
+
*/
|
|
756
834
|
static iterationsForConstant(copies: number, iterations: number): Record<string, unknown>;
|
|
835
|
+
/**
|
|
836
|
+
* Builds an iteration-limited constant-concurrency load shape.
|
|
837
|
+
* Use this when a fixed number of iterations should be shared across constant workers.
|
|
838
|
+
*/
|
|
757
839
|
static IterationsForConstant(copies: number, iterations: number): Record<string, unknown>;
|
|
840
|
+
/**
|
|
841
|
+
* Builds an iteration-limited injection load shape.
|
|
842
|
+
* Use this when a fixed number of injected iterations should be executed.
|
|
843
|
+
*/
|
|
758
844
|
static iterationsForInject(rate: number, intervalSeconds: number, iterations: number): Record<string, unknown>;
|
|
845
|
+
/**
|
|
846
|
+
* Builds an iteration-limited injection load shape.
|
|
847
|
+
* Use this when a fixed number of injected iterations should be executed.
|
|
848
|
+
*/
|
|
759
849
|
static IterationsForInject(rate: number, intervalSeconds: number, iterations: number): Record<string, unknown>;
|
|
850
|
+
/**
|
|
851
|
+
* Builds a constant-concurrency load shape.
|
|
852
|
+
* Use this when a fixed number of virtual users should stay active.
|
|
853
|
+
*/
|
|
760
854
|
static keepConstant(copies: number, duringSeconds: number): Record<string, unknown>;
|
|
855
|
+
/**
|
|
856
|
+
* Builds a constant-concurrency load shape.
|
|
857
|
+
* Use this when a fixed number of virtual users should stay active.
|
|
858
|
+
*/
|
|
761
859
|
static KeepConstant(copies: number, duringSeconds: number): Record<string, unknown>;
|
|
860
|
+
/**
|
|
861
|
+
* Builds a randomized injection load shape.
|
|
862
|
+
* Use this when traffic should fluctuate between a minimum and maximum rate.
|
|
863
|
+
*/
|
|
762
864
|
static injectRandom(minRate: number, maxRate: number, intervalSeconds: number, duringSeconds: number): Record<string, unknown>;
|
|
865
|
+
/**
|
|
866
|
+
* Builds a randomized injection load shape.
|
|
867
|
+
* Use this when traffic should fluctuate between a minimum and maximum rate.
|
|
868
|
+
*/
|
|
763
869
|
static InjectRandom(minRate: number, maxRate: number, intervalSeconds: number, duringSeconds: number): Record<string, unknown>;
|
|
870
|
+
/**
|
|
871
|
+
* Builds a ramping injection load shape.
|
|
872
|
+
* Use this when request rate should increase over time.
|
|
873
|
+
*/
|
|
764
874
|
static rampingInject(rate: number, intervalSeconds: number, duringSeconds: number): Record<string, unknown>;
|
|
875
|
+
/**
|
|
876
|
+
* Builds a ramping injection load shape.
|
|
877
|
+
* Use this when request rate should increase over time.
|
|
878
|
+
*/
|
|
765
879
|
static RampingInject(rate: number, intervalSeconds: number, duringSeconds: number): Record<string, unknown>;
|
|
880
|
+
/**
|
|
881
|
+
* Builds a ramping-concurrency load shape.
|
|
882
|
+
* Use this when the number of active virtual users should climb over time.
|
|
883
|
+
*/
|
|
766
884
|
static rampingConstant(copies: number, duringSeconds: number): Record<string, unknown>;
|
|
885
|
+
/**
|
|
886
|
+
* Builds a ramping-concurrency load shape.
|
|
887
|
+
* Use this when the number of active virtual users should climb over time.
|
|
888
|
+
*/
|
|
767
889
|
static RampingConstant(copies: number, duringSeconds: number): Record<string, unknown>;
|
|
890
|
+
/**
|
|
891
|
+
* Builds a pause segment in a load profile.
|
|
892
|
+
* Use this when a simulation should intentionally idle for a period.
|
|
893
|
+
*/
|
|
768
894
|
static pause(duringSeconds: number): Record<string, unknown>;
|
|
895
|
+
/**
|
|
896
|
+
* Builds a pause segment in a load profile.
|
|
897
|
+
* Use this when a simulation should intentionally idle for a period.
|
|
898
|
+
*/
|
|
769
899
|
static Pause(duringSeconds: number): Record<string, unknown>;
|
|
770
900
|
}
|
|
771
901
|
export declare class LoadStrikeCounter {
|
|
@@ -773,11 +903,35 @@ export declare class LoadStrikeCounter {
|
|
|
773
903
|
readonly name: string;
|
|
774
904
|
readonly unitOfMeasure: string;
|
|
775
905
|
private current;
|
|
906
|
+
/**
|
|
907
|
+
* Exposes the public constructor operation.
|
|
908
|
+
* Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
|
|
909
|
+
*/
|
|
776
910
|
constructor(name: string, initialValueOrUnit?: number | string, unitOfMeasure?: string);
|
|
911
|
+
/**
|
|
912
|
+
* Adds a value to the current metric.
|
|
913
|
+
* Use this when a counter or gauge should be incremented by an explicit delta.
|
|
914
|
+
*/
|
|
777
915
|
add(value: number): number;
|
|
916
|
+
/**
|
|
917
|
+
* Increments the current metric by one.
|
|
918
|
+
* Use this when events should simply be counted.
|
|
919
|
+
*/
|
|
778
920
|
increment(by?: number): number;
|
|
921
|
+
/**
|
|
922
|
+
* Returns the current metric value.
|
|
923
|
+
* Use this when custom metric state needs to be inspected inside user code.
|
|
924
|
+
*/
|
|
779
925
|
value(): number;
|
|
926
|
+
/**
|
|
927
|
+
* Adds a value to the current metric.
|
|
928
|
+
* Use this when a counter or gauge should be incremented by an explicit delta.
|
|
929
|
+
*/
|
|
780
930
|
Add(value: number): number;
|
|
931
|
+
/**
|
|
932
|
+
* Increments the current metric by one.
|
|
933
|
+
* Use this when events should simply be counted.
|
|
934
|
+
*/
|
|
781
935
|
Increment(by?: number): number;
|
|
782
936
|
get MetricName(): string;
|
|
783
937
|
get UnitOfMeasure(): string;
|
|
@@ -788,26 +942,90 @@ export declare class LoadStrikeGauge {
|
|
|
788
942
|
readonly name: string;
|
|
789
943
|
readonly unitOfMeasure: string;
|
|
790
944
|
private current;
|
|
945
|
+
/**
|
|
946
|
+
* Exposes the public constructor operation.
|
|
947
|
+
* Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
|
|
948
|
+
*/
|
|
791
949
|
constructor(name: string, initialValueOrUnit?: number | string, unitOfMeasure?: string);
|
|
950
|
+
/**
|
|
951
|
+
* Sets the current gauge value.
|
|
952
|
+
* Use this when the latest observed value should replace the previous one.
|
|
953
|
+
*/
|
|
792
954
|
set(value: number): number;
|
|
955
|
+
/**
|
|
956
|
+
* Adds a value to the current metric.
|
|
957
|
+
* Use this when a counter or gauge should be incremented by an explicit delta.
|
|
958
|
+
*/
|
|
793
959
|
add(value: number): number;
|
|
960
|
+
/**
|
|
961
|
+
* Increments the current metric by one.
|
|
962
|
+
* Use this when events should simply be counted.
|
|
963
|
+
*/
|
|
794
964
|
increment(by?: number): number;
|
|
965
|
+
/**
|
|
966
|
+
* Decrements the current metric by one.
|
|
967
|
+
* Use this when a gauge should move down by a single unit.
|
|
968
|
+
*/
|
|
795
969
|
decrement(by?: number): number;
|
|
970
|
+
/**
|
|
971
|
+
* Returns the current metric value.
|
|
972
|
+
* Use this when custom metric state needs to be inspected inside user code.
|
|
973
|
+
*/
|
|
796
974
|
value(): number;
|
|
975
|
+
/**
|
|
976
|
+
* Sets the current gauge value.
|
|
977
|
+
* Use this when the latest observed value should replace the previous one.
|
|
978
|
+
*/
|
|
797
979
|
Set(value: number): number;
|
|
980
|
+
/**
|
|
981
|
+
* Adds a value to the current metric.
|
|
982
|
+
* Use this when a counter or gauge should be incremented by an explicit delta.
|
|
983
|
+
*/
|
|
798
984
|
Add(value: number): number;
|
|
985
|
+
/**
|
|
986
|
+
* Increments the current metric by one.
|
|
987
|
+
* Use this when events should simply be counted.
|
|
988
|
+
*/
|
|
799
989
|
Increment(by?: number): number;
|
|
990
|
+
/**
|
|
991
|
+
* Decrements the current metric by one.
|
|
992
|
+
* Use this when a gauge should move down by a single unit.
|
|
993
|
+
*/
|
|
800
994
|
Decrement(by?: number): number;
|
|
801
995
|
get MetricName(): string;
|
|
802
996
|
get UnitOfMeasure(): string;
|
|
803
997
|
get Value(): number;
|
|
804
998
|
}
|
|
805
999
|
export declare class LoadStrikeMetric {
|
|
1000
|
+
/**
|
|
1001
|
+
* Creates a counter metric.
|
|
1002
|
+
* Use this when a scenario should accumulate a monotonically increasing custom metric.
|
|
1003
|
+
*/
|
|
806
1004
|
static counter(name: string, initialValueOrUnit?: number | string, unitOfMeasure?: string): LoadStrikeCounter;
|
|
1005
|
+
/**
|
|
1006
|
+
* Creates a gauge metric.
|
|
1007
|
+
* Use this when a scenario should track the latest value of a custom metric.
|
|
1008
|
+
*/
|
|
807
1009
|
static gauge(name: string, initialValueOrUnit?: number | string, unitOfMeasure?: string): LoadStrikeGauge;
|
|
1010
|
+
/**
|
|
1011
|
+
* Creates a counter metric.
|
|
1012
|
+
* Use this when a scenario should accumulate a monotonically increasing custom metric.
|
|
1013
|
+
*/
|
|
808
1014
|
static Counter(name: string, initialValueOrUnit?: number | string, unitOfMeasure?: string): LoadStrikeCounter;
|
|
1015
|
+
/**
|
|
1016
|
+
* Creates a gauge metric.
|
|
1017
|
+
* Use this when a scenario should track the latest value of a custom metric.
|
|
1018
|
+
*/
|
|
809
1019
|
static Gauge(name: string, initialValueOrUnit?: number | string, unitOfMeasure?: string): LoadStrikeGauge;
|
|
1020
|
+
/**
|
|
1021
|
+
* Creates a counter metric.
|
|
1022
|
+
* Use this when a scenario should accumulate a monotonically increasing custom metric.
|
|
1023
|
+
*/
|
|
810
1024
|
static CreateCounter(name: string, unitOfMeasure?: string): LoadStrikeCounter;
|
|
1025
|
+
/**
|
|
1026
|
+
* Creates a gauge metric.
|
|
1027
|
+
* Use this when a scenario should track the latest value of a custom metric.
|
|
1028
|
+
*/
|
|
811
1029
|
static CreateGauge(name: string, unitOfMeasure?: string): LoadStrikeGauge;
|
|
812
1030
|
}
|
|
813
1031
|
export declare class LoadStrikeThreshold {
|
|
@@ -872,15 +1090,33 @@ export interface LoadStrikeRunContext {
|
|
|
872
1090
|
WorkerPlugins?: ILoadStrikeWorkerPlugin[];
|
|
873
1091
|
CustomSettings?: Record<string, unknown>;
|
|
874
1092
|
GlobalCustomSettings?: Record<string, unknown>;
|
|
1093
|
+
AgentExecutionToken?: string;
|
|
1094
|
+
AgentCommandId?: string;
|
|
875
1095
|
}
|
|
876
1096
|
export declare class LoadStrikeContext {
|
|
877
1097
|
private values;
|
|
878
1098
|
private registeredScenarios;
|
|
879
1099
|
private runArgs;
|
|
880
1100
|
constructor(values?: LoadStrikeRunContext, registeredScenarios?: LoadStrikeScenario[], runArgs?: string[]);
|
|
1101
|
+
/**
|
|
1102
|
+
* Creates a new instance of this public SDK type.
|
|
1103
|
+
* Use this when you are starting a run definition from scratch.
|
|
1104
|
+
*/
|
|
881
1105
|
static create(): LoadStrikeContext;
|
|
1106
|
+
/**
|
|
1107
|
+
* Exposes the public toObject operation.
|
|
1108
|
+
* Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
|
|
1109
|
+
*/
|
|
882
1110
|
toObject(): LoadStrikeRunContext;
|
|
1111
|
+
/**
|
|
1112
|
+
* Builds the current configuration into a runnable context.
|
|
1113
|
+
* Use this when you want to inspect or reuse the final run settings before execution.
|
|
1114
|
+
*/
|
|
883
1115
|
buildContext(): LoadStrikeContext;
|
|
1116
|
+
/**
|
|
1117
|
+
* Builds the current configuration into a runnable context.
|
|
1118
|
+
* Use this when you want to inspect or reuse the final run settings before execution.
|
|
1119
|
+
*/
|
|
884
1120
|
BuildContext(): LoadStrikeContext;
|
|
885
1121
|
run(): Promise<LoadStrikeRunResult>;
|
|
886
1122
|
run(args: string[]): Promise<LoadStrikeRunResult>;
|
|
@@ -888,6 +1124,10 @@ export declare class LoadStrikeContext {
|
|
|
888
1124
|
Run(): Promise<LoadStrikeRunResult>;
|
|
889
1125
|
Run(args: string[]): Promise<LoadStrikeRunResult>;
|
|
890
1126
|
Run(...args: string[]): Promise<LoadStrikeRunResult>;
|
|
1127
|
+
/**
|
|
1128
|
+
* Exposes the public toRunnerOptions operation.
|
|
1129
|
+
* Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
|
|
1130
|
+
*/
|
|
891
1131
|
toRunnerOptions(): LoadStrikeRunnerOptions;
|
|
892
1132
|
configure(configure: (context: LoadStrikeContext) => LoadStrikeContext): LoadStrikeContext;
|
|
893
1133
|
configure(context: LoadStrikeContext | LoadStrikeRunContext): LoadStrikeContext;
|
|
@@ -895,72 +1135,332 @@ export declare class LoadStrikeContext {
|
|
|
895
1135
|
Configure(configure: (context: LoadStrikeContext) => LoadStrikeContext): LoadStrikeContext;
|
|
896
1136
|
Configure(context: LoadStrikeContext | LoadStrikeRunContext): LoadStrikeContext;
|
|
897
1137
|
Configure(options: LoadStrikeRunnerOptions): LoadStrikeContext;
|
|
1138
|
+
/**
|
|
1139
|
+
* Copies settings from an existing context snapshot.
|
|
1140
|
+
* Use this when a runner should inherit configuration that was already assembled elsewhere.
|
|
1141
|
+
*/
|
|
898
1142
|
configureContext(context: LoadStrikeContext | LoadStrikeRunContext): LoadStrikeContext;
|
|
1143
|
+
/**
|
|
1144
|
+
* Copies settings from an existing context snapshot.
|
|
1145
|
+
* Use this when a runner should inherit configuration that was already assembled elsewhere.
|
|
1146
|
+
*/
|
|
899
1147
|
ConfigureContext(context: LoadStrikeContext | LoadStrikeRunContext): LoadStrikeContext;
|
|
1148
|
+
/**
|
|
1149
|
+
* Toggles realtime console metric output.
|
|
1150
|
+
* Use this when a local run or CI log should stream live throughput and latency updates.
|
|
1151
|
+
*/
|
|
900
1152
|
displayConsoleMetrics(enable: boolean): LoadStrikeContext;
|
|
1153
|
+
/**
|
|
1154
|
+
* Toggles realtime console metric output.
|
|
1155
|
+
* Use this when a local run or CI log should stream live throughput and latency updates.
|
|
1156
|
+
*/
|
|
901
1157
|
DisplayConsoleMetrics(enable: boolean): LoadStrikeContext;
|
|
1158
|
+
/**
|
|
1159
|
+
* Toggles local development cluster mode.
|
|
1160
|
+
* Use this when you want to simulate coordinator and agent behavior on a single machine.
|
|
1161
|
+
*/
|
|
902
1162
|
enableLocalDevCluster(enable: boolean): LoadStrikeContext;
|
|
1163
|
+
/**
|
|
1164
|
+
* Toggles local development cluster mode.
|
|
1165
|
+
* Use this when you want to simulate coordinator and agent behavior on a single machine.
|
|
1166
|
+
*/
|
|
903
1167
|
EnableLocalDevCluster(enable: boolean): LoadStrikeContext;
|
|
1168
|
+
/**
|
|
1169
|
+
* Loads run settings from a JSON config file.
|
|
1170
|
+
* Use this when configuration should come from a checked-in or generated config document.
|
|
1171
|
+
*/
|
|
904
1172
|
loadConfig(path: string): LoadStrikeContext;
|
|
1173
|
+
/**
|
|
1174
|
+
* Loads run settings from a JSON config file.
|
|
1175
|
+
* Use this when configuration should come from a checked-in or generated config document.
|
|
1176
|
+
*/
|
|
905
1177
|
LoadConfig(path: string): LoadStrikeContext;
|
|
1178
|
+
/**
|
|
1179
|
+
* Loads infrastructure settings for sinks, plugins, or transport dependencies.
|
|
1180
|
+
* Use this when runtime integrations depend on external connection details.
|
|
1181
|
+
*/
|
|
906
1182
|
loadInfraConfig(path: string): LoadStrikeContext;
|
|
1183
|
+
/**
|
|
1184
|
+
* Loads infrastructure settings for sinks, plugins, or transport dependencies.
|
|
1185
|
+
* Use this when runtime integrations depend on external connection details.
|
|
1186
|
+
*/
|
|
907
1187
|
LoadInfraConfig(path: string): LoadStrikeContext;
|
|
1188
|
+
/**
|
|
1189
|
+
* Sets the agent group for this node or run.
|
|
1190
|
+
* Use this when only a subset of agents should pick up a particular workload.
|
|
1191
|
+
*/
|
|
908
1192
|
withAgentGroup(agentGroup: string): LoadStrikeContext;
|
|
1193
|
+
/**
|
|
1194
|
+
* Sets the agent group for this node or run.
|
|
1195
|
+
* Use this when only a subset of agents should pick up a particular workload.
|
|
1196
|
+
*/
|
|
909
1197
|
WithAgentGroup(agentGroup: string): LoadStrikeContext;
|
|
1198
|
+
/**
|
|
1199
|
+
* Sets the requested agent count.
|
|
1200
|
+
* Use this when a coordinator should fan work out across a specific number of agents.
|
|
1201
|
+
*/
|
|
910
1202
|
withAgentsCount(agentsCount: number): LoadStrikeContext;
|
|
1203
|
+
/**
|
|
1204
|
+
* Sets the requested agent count.
|
|
1205
|
+
* Use this when a coordinator should fan work out across a specific number of agents.
|
|
1206
|
+
*/
|
|
911
1207
|
WithAgentsCount(agentsCount: number): LoadStrikeContext;
|
|
1208
|
+
/**
|
|
1209
|
+
* Targets a shared set of scenarios.
|
|
1210
|
+
* Use this when only selected scenarios should execute for the current node or run.
|
|
1211
|
+
*/
|
|
912
1212
|
withTargetScenarios(...scenarioNames: string[]): LoadStrikeContext;
|
|
1213
|
+
/**
|
|
1214
|
+
* Targets a shared set of scenarios.
|
|
1215
|
+
* Use this when only selected scenarios should execute for the current node or run.
|
|
1216
|
+
*/
|
|
913
1217
|
WithTargetScenarios(...scenarioNames: string[]): LoadStrikeContext;
|
|
1218
|
+
/**
|
|
1219
|
+
* Targets scenarios for agent nodes only.
|
|
1220
|
+
* Use this when agents should execute only a subset of the registered scenarios.
|
|
1221
|
+
*/
|
|
914
1222
|
withAgentTargetScenarios(...scenarioNames: string[]): LoadStrikeContext;
|
|
1223
|
+
/**
|
|
1224
|
+
* Targets scenarios for agent nodes only.
|
|
1225
|
+
* Use this when agents should execute only a subset of the registered scenarios.
|
|
1226
|
+
*/
|
|
915
1227
|
WithAgentTargetScenarios(...scenarioNames: string[]): LoadStrikeContext;
|
|
1228
|
+
/**
|
|
1229
|
+
* Targets scenarios for the coordinator only.
|
|
1230
|
+
* Use this when orchestration or control-node work should run on the coordinator itself.
|
|
1231
|
+
*/
|
|
916
1232
|
withCoordinatorTargetScenarios(...scenarioNames: string[]): LoadStrikeContext;
|
|
1233
|
+
/**
|
|
1234
|
+
* Targets scenarios for the coordinator only.
|
|
1235
|
+
* Use this when orchestration or control-node work should run on the coordinator itself.
|
|
1236
|
+
*/
|
|
917
1237
|
WithCoordinatorTargetScenarios(...scenarioNames: string[]): LoadStrikeContext;
|
|
1238
|
+
/**
|
|
1239
|
+
* Sets the runner key used for licensing validation.
|
|
1240
|
+
* Use this when the run must authenticate against the licensing API before it starts.
|
|
1241
|
+
*/
|
|
918
1242
|
withRunnerKey(runnerKey: string): LoadStrikeContext;
|
|
1243
|
+
/**
|
|
1244
|
+
* Sets the runner key used for licensing validation.
|
|
1245
|
+
* Use this when the run must authenticate against the licensing API before it starts.
|
|
1246
|
+
*/
|
|
919
1247
|
WithRunnerKey(runnerKey: string): LoadStrikeContext;
|
|
1248
|
+
/**
|
|
1249
|
+
* Sets how long the SDK waits for licensing validation to complete.
|
|
1250
|
+
* Use this when control-plane latency or private networking requires a longer validation window.
|
|
1251
|
+
*/
|
|
920
1252
|
withLicenseValidationTimeout(timeoutSeconds: number): LoadStrikeContext;
|
|
1253
|
+
/**
|
|
1254
|
+
* Sets how long the SDK waits for licensing validation to complete.
|
|
1255
|
+
* Use this when control-plane latency or private networking requires a longer validation window.
|
|
1256
|
+
*/
|
|
921
1257
|
WithLicenseValidationTimeout(timeoutSeconds: number): LoadStrikeContext;
|
|
1258
|
+
/**
|
|
1259
|
+
* Sets the runtime node type.
|
|
1260
|
+
* Use this when a process should behave as a single node, coordinator, or agent.
|
|
1261
|
+
*/
|
|
922
1262
|
withNodeType(nodeType: LoadStrikeNodeTypeInput): LoadStrikeContext;
|
|
1263
|
+
/**
|
|
1264
|
+
* Sets the runtime node type.
|
|
1265
|
+
* Use this when a process should behave as a single node, coordinator, or agent.
|
|
1266
|
+
*/
|
|
923
1267
|
WithNodeType(nodeType: LoadStrikeNodeTypeInput): LoadStrikeContext;
|
|
1268
|
+
/**
|
|
1269
|
+
* Sets the NATS server URL used for distributed cluster coordination.
|
|
1270
|
+
* Use this when coordinator and agent nodes communicate over NATS.
|
|
1271
|
+
*/
|
|
924
1272
|
withNatsServerUrl(natsUrl: string): LoadStrikeContext;
|
|
1273
|
+
/**
|
|
1274
|
+
* Sets the NATS server URL used for distributed cluster coordination.
|
|
1275
|
+
* Use this when coordinator and agent nodes communicate over NATS.
|
|
1276
|
+
*/
|
|
925
1277
|
WithNatsServerUrl(natsUrl: string): LoadStrikeContext;
|
|
1278
|
+
/**
|
|
1279
|
+
* Disables local report generation.
|
|
1280
|
+
* Use this when reports are unnecessary or should be handled exclusively by sinks.
|
|
1281
|
+
*/
|
|
926
1282
|
withoutReports(): LoadStrikeContext;
|
|
1283
|
+
/**
|
|
1284
|
+
* Disables local report generation.
|
|
1285
|
+
* Use this when reports are unnecessary or should be handled exclusively by sinks.
|
|
1286
|
+
*/
|
|
927
1287
|
WithoutReports(): LoadStrikeContext;
|
|
1288
|
+
/**
|
|
1289
|
+
* Sets the base file name for generated reports.
|
|
1290
|
+
* Use this when exported reports should use a predictable naming convention.
|
|
1291
|
+
*/
|
|
928
1292
|
withReportFileName(reportFileName: string): LoadStrikeContext;
|
|
1293
|
+
/**
|
|
1294
|
+
* Sets the base file name for generated reports.
|
|
1295
|
+
* Use this when exported reports should use a predictable naming convention.
|
|
1296
|
+
*/
|
|
929
1297
|
WithReportFileName(reportFileName: string): LoadStrikeContext;
|
|
1298
|
+
/**
|
|
1299
|
+
* Sets the output folder for generated reports.
|
|
1300
|
+
* Use this when report files should land in a specific directory.
|
|
1301
|
+
*/
|
|
930
1302
|
withReportFolder(reportFolderPath: string): LoadStrikeContext;
|
|
1303
|
+
/**
|
|
1304
|
+
* Sets the output folder for generated reports.
|
|
1305
|
+
* Use this when report files should land in a specific directory.
|
|
1306
|
+
*/
|
|
931
1307
|
WithReportFolder(reportFolderPath: string): LoadStrikeContext;
|
|
1308
|
+
/**
|
|
1309
|
+
* Restricts generated reports to specific formats.
|
|
1310
|
+
* Use this when you want only selected report artifacts such as HTML, CSV, or Markdown.
|
|
1311
|
+
*/
|
|
932
1312
|
withReportFormats(...reportFormats: Array<LoadStrikeReportFormat | string>): LoadStrikeContext;
|
|
1313
|
+
/**
|
|
1314
|
+
* Restricts generated reports to specific formats.
|
|
1315
|
+
* Use this when you want only selected report artifacts such as HTML, CSV, or Markdown.
|
|
1316
|
+
*/
|
|
933
1317
|
WithReportFormats(...reportFormats: Array<LoadStrikeReportFormat | string>): LoadStrikeContext;
|
|
1318
|
+
/**
|
|
1319
|
+
* Sets the realtime reporting cadence.
|
|
1320
|
+
* Use this when sinks or dashboards should receive updates at a controlled interval.
|
|
1321
|
+
*/
|
|
934
1322
|
withReportingInterval(intervalSeconds: number): LoadStrikeContext;
|
|
1323
|
+
/**
|
|
1324
|
+
* Sets the realtime reporting cadence.
|
|
1325
|
+
* Use this when sinks or dashboards should receive updates at a controlled interval.
|
|
1326
|
+
*/
|
|
935
1327
|
WithReportingInterval(intervalSeconds: number): LoadStrikeContext;
|
|
1328
|
+
/**
|
|
1329
|
+
* Registers one or more reporting sinks.
|
|
1330
|
+
* Use this when run results must be pushed to external observability or storage systems.
|
|
1331
|
+
*/
|
|
936
1332
|
withReportingSinks(...sinks: ILoadStrikeReportingSink[]): LoadStrikeContext;
|
|
1333
|
+
/**
|
|
1334
|
+
* Registers one or more reporting sinks.
|
|
1335
|
+
* Use this when run results must be pushed to external observability or storage systems.
|
|
1336
|
+
*/
|
|
937
1337
|
WithReportingSinks(...sinks: ILoadStrikeReportingSink[]): LoadStrikeContext;
|
|
1338
|
+
/**
|
|
1339
|
+
* Registers runtime policies for the run.
|
|
1340
|
+
* Use this when scenario selection or step execution should obey policy callbacks.
|
|
1341
|
+
*/
|
|
938
1342
|
withRuntimePolicies(...policies: LoadStrikeRuntimePolicy[]): LoadStrikeContext;
|
|
1343
|
+
/**
|
|
1344
|
+
* Registers runtime policies for the run.
|
|
1345
|
+
* Use this when scenario selection or step execution should obey policy callbacks.
|
|
1346
|
+
*/
|
|
939
1347
|
WithRuntimePolicies(...policies: LoadStrikeRuntimePolicy[]): LoadStrikeContext;
|
|
1348
|
+
/**
|
|
1349
|
+
* Sets how runtime policy failures are handled.
|
|
1350
|
+
* Use this when policy errors should either fail fast or be tolerated.
|
|
1351
|
+
*/
|
|
940
1352
|
withRuntimePolicyErrorMode(mode: LoadStrikeRuntimePolicyErrorMode | string): LoadStrikeContext;
|
|
1353
|
+
/**
|
|
1354
|
+
* Sets how runtime policy failures are handled.
|
|
1355
|
+
* Use this when policy errors should either fail fast or be tolerated.
|
|
1356
|
+
*/
|
|
941
1357
|
WithRuntimePolicyErrorMode(mode: LoadStrikeRuntimePolicyErrorMode | string): LoadStrikeContext;
|
|
1358
|
+
/**
|
|
1359
|
+
* Registers worker plugins for the run.
|
|
1360
|
+
* Use this when custom plugin data should be collected alongside run results.
|
|
1361
|
+
*/
|
|
942
1362
|
withWorkerPlugins(...plugins: ILoadStrikeWorkerPlugin[]): LoadStrikeContext;
|
|
1363
|
+
/**
|
|
1364
|
+
* Registers worker plugins for the run.
|
|
1365
|
+
* Use this when custom plugin data should be collected alongside run results.
|
|
1366
|
+
*/
|
|
943
1367
|
WithWorkerPlugins(...plugins: ILoadStrikeWorkerPlugin[]): LoadStrikeContext;
|
|
1368
|
+
/**
|
|
1369
|
+
* Sets the minimum runtime log level.
|
|
1370
|
+
* Use this when the run should emit less or more operational detail.
|
|
1371
|
+
*/
|
|
944
1372
|
withMinimumLogLevel(minimumLogLevel: LoadStrikeLogLevel | string): LoadStrikeContext;
|
|
1373
|
+
/**
|
|
1374
|
+
* Sets the minimum runtime log level.
|
|
1375
|
+
* Use this when the run should emit less or more operational detail.
|
|
1376
|
+
*/
|
|
945
1377
|
WithMinimumLogLevel(minimumLogLevel: LoadStrikeLogLevel | string): LoadStrikeContext;
|
|
1378
|
+
/**
|
|
1379
|
+
* Supplies a custom logger configuration factory.
|
|
1380
|
+
* Use this when the default runtime logging output is not enough for your environment.
|
|
1381
|
+
*/
|
|
946
1382
|
withLoggerConfig(loggerConfig: () => LoadStrikeLogger): LoadStrikeContext;
|
|
1383
|
+
/**
|
|
1384
|
+
* Supplies a custom logger configuration factory.
|
|
1385
|
+
* Use this when the default runtime logging output is not enough for your environment.
|
|
1386
|
+
*/
|
|
947
1387
|
WithLoggerConfig(loggerConfig: () => LoadStrikeLogger): LoadStrikeContext;
|
|
1388
|
+
/**
|
|
1389
|
+
* Sets the timeout for scenario completion.
|
|
1390
|
+
* Use this when long-running scenarios need an explicit completion window.
|
|
1391
|
+
*/
|
|
948
1392
|
withScenarioCompletionTimeout(timeoutSeconds: number): LoadStrikeContext;
|
|
1393
|
+
/**
|
|
1394
|
+
* Sets the timeout for scenario completion.
|
|
1395
|
+
* Use this when long-running scenarios need an explicit completion window.
|
|
1396
|
+
*/
|
|
949
1397
|
WithScenarioCompletionTimeout(timeoutSeconds: number): LoadStrikeContext;
|
|
1398
|
+
/**
|
|
1399
|
+
* Sets the timeout for cluster command round-trips.
|
|
1400
|
+
* Use this when distributed control messages need a tighter or looser deadline.
|
|
1401
|
+
*/
|
|
950
1402
|
withClusterCommandTimeout(timeoutSeconds: number): LoadStrikeContext;
|
|
1403
|
+
/**
|
|
1404
|
+
* Sets the timeout for cluster command round-trips.
|
|
1405
|
+
* Use this when distributed control messages need a tighter or looser deadline.
|
|
1406
|
+
*/
|
|
951
1407
|
WithClusterCommandTimeout(timeoutSeconds: number): LoadStrikeContext;
|
|
1408
|
+
/**
|
|
1409
|
+
* Sets the retry limit for restartable failed iterations.
|
|
1410
|
+
* Use this when transient failures should be retried a fixed number of times.
|
|
1411
|
+
*/
|
|
952
1412
|
withRestartIterationMaxAttempts(attempts: number): LoadStrikeContext;
|
|
1413
|
+
/**
|
|
1414
|
+
* Sets the retry limit for restartable failed iterations.
|
|
1415
|
+
* Use this when transient failures should be retried a fixed number of times.
|
|
1416
|
+
*/
|
|
953
1417
|
WithRestartIterationMaxAttempts(attempts: number): LoadStrikeContext;
|
|
1418
|
+
/**
|
|
1419
|
+
* Sets the session identifier for this run.
|
|
1420
|
+
* Use this when downstream logs, reports, or external systems need a stable session id.
|
|
1421
|
+
*/
|
|
954
1422
|
withSessionId(sessionId: string): LoadStrikeContext;
|
|
1423
|
+
/**
|
|
1424
|
+
* Sets the session identifier for this run.
|
|
1425
|
+
* Use this when downstream logs, reports, or external systems need a stable session id.
|
|
1426
|
+
*/
|
|
955
1427
|
WithSessionId(sessionId: string): LoadStrikeContext;
|
|
1428
|
+
/**
|
|
1429
|
+
* Sets the test suite label for the run.
|
|
1430
|
+
* Use this when related tests should be grouped under a suite name.
|
|
1431
|
+
*/
|
|
956
1432
|
withTestSuite(testSuite: string): LoadStrikeContext;
|
|
1433
|
+
/**
|
|
1434
|
+
* Sets the test suite label for the run.
|
|
1435
|
+
* Use this when related tests should be grouped under a suite name.
|
|
1436
|
+
*/
|
|
957
1437
|
WithTestSuite(testSuite: string): LoadStrikeContext;
|
|
1438
|
+
/**
|
|
1439
|
+
* Sets the test name label for the run.
|
|
1440
|
+
* Use this when reports and logs should expose a human-readable test identifier.
|
|
1441
|
+
*/
|
|
958
1442
|
withTestName(testName: string): LoadStrikeContext;
|
|
1443
|
+
/**
|
|
1444
|
+
* Sets the test name label for the run.
|
|
1445
|
+
* Use this when reports and logs should expose a human-readable test identifier.
|
|
1446
|
+
*/
|
|
959
1447
|
WithTestName(testName: string): LoadStrikeContext;
|
|
1448
|
+
/**
|
|
1449
|
+
* Sets the cluster identifier for this run.
|
|
1450
|
+
* Use this when multiple cluster nodes must join the same distributed execution.
|
|
1451
|
+
*/
|
|
960
1452
|
withClusterId(clusterId: string): LoadStrikeContext;
|
|
1453
|
+
/**
|
|
1454
|
+
* Sets the cluster identifier for this run.
|
|
1455
|
+
* Use this when multiple cluster nodes must join the same distributed execution.
|
|
1456
|
+
*/
|
|
961
1457
|
WithClusterId(clusterId: string): LoadStrikeContext;
|
|
962
1458
|
private mergeValues;
|
|
963
1459
|
private assignState;
|
|
1460
|
+
/**
|
|
1461
|
+
* Configures registered scenarios for this SDK object.
|
|
1462
|
+
* Use this when registered scenarios should be set explicitly before the run starts.
|
|
1463
|
+
*/
|
|
964
1464
|
withRegisteredScenarios(...scenarios: LoadStrikeScenario[]): LoadStrikeContext;
|
|
965
1465
|
}
|
|
966
1466
|
export declare class LoadStrikeScenario {
|
|
@@ -981,43 +1481,179 @@ export declare class LoadStrikeScenario {
|
|
|
981
1481
|
static Create(name: string, runHandler: (context: LoadStrikeScenarioContext) => Promise<LoadStrikeStepReply> | LoadStrikeStepReply): LoadStrikeScenario;
|
|
982
1482
|
static createAsync(name: string, runHandler: (context: LoadStrikeScenarioContext) => Promise<LoadStrikeStepReply> | LoadStrikeStepReply): LoadStrikeScenario;
|
|
983
1483
|
static CreateAsync(name: string, runHandler: (context: LoadStrikeScenarioContext) => Promise<LoadStrikeStepReply> | LoadStrikeStepReply): LoadStrikeScenario;
|
|
1484
|
+
/**
|
|
1485
|
+
* Creates a placeholder scenario that returns the default success reply.
|
|
1486
|
+
* Use this when you want a scenario shell before adding setup, cleanup, or more detailed behavior.
|
|
1487
|
+
*/
|
|
984
1488
|
static empty(name: string): LoadStrikeScenario;
|
|
1489
|
+
/**
|
|
1490
|
+
* Creates a placeholder scenario that returns the default success reply.
|
|
1491
|
+
* Use this when you want a scenario shell before adding setup, cleanup, or more detailed behavior.
|
|
1492
|
+
*/
|
|
985
1493
|
static Empty(name: string): LoadStrikeScenario;
|
|
986
1494
|
get Name(): string;
|
|
1495
|
+
/**
|
|
1496
|
+
* Configures init for this SDK object.
|
|
1497
|
+
* Use this when init should be set explicitly before the run starts.
|
|
1498
|
+
*/
|
|
987
1499
|
withInit(handler: (context: LoadStrikeScenarioInitContext) => Promise<void> | void): LoadStrikeScenario;
|
|
1500
|
+
/**
|
|
1501
|
+
* Configures init async for this SDK object.
|
|
1502
|
+
* Use this when init async should be set explicitly before the run starts.
|
|
1503
|
+
*/
|
|
988
1504
|
withInitAsync(handler: (context: LoadStrikeScenarioInitContext) => Promise<void> | void): LoadStrikeScenario;
|
|
1505
|
+
/**
|
|
1506
|
+
* Configures clean for this SDK object.
|
|
1507
|
+
* Use this when clean should be set explicitly before the run starts.
|
|
1508
|
+
*/
|
|
989
1509
|
withClean(handler: (context: LoadStrikeScenarioInitContext) => Promise<void> | void): LoadStrikeScenario;
|
|
1510
|
+
/**
|
|
1511
|
+
* Configures clean async for this SDK object.
|
|
1512
|
+
* Use this when clean async should be set explicitly before the run starts.
|
|
1513
|
+
*/
|
|
990
1514
|
withCleanAsync(handler: (context: LoadStrikeScenarioInitContext) => Promise<void> | void): LoadStrikeScenario;
|
|
1515
|
+
/**
|
|
1516
|
+
* Configures max fail count for this SDK object.
|
|
1517
|
+
* Use this when max fail count should be set explicitly before the run starts.
|
|
1518
|
+
*/
|
|
991
1519
|
withMaxFailCount(maxFailCount: number): LoadStrikeScenario;
|
|
1520
|
+
/**
|
|
1521
|
+
* Configures out warm up for this SDK object.
|
|
1522
|
+
* Use this when out warm up should be set explicitly before the run starts.
|
|
1523
|
+
*/
|
|
992
1524
|
withoutWarmUp(): LoadStrikeScenario;
|
|
1525
|
+
/**
|
|
1526
|
+
* Configures warm up duration for this SDK object.
|
|
1527
|
+
* Use this when warm up duration should be set explicitly before the run starts.
|
|
1528
|
+
*/
|
|
993
1529
|
withWarmUpDuration(durationSeconds: number): LoadStrikeScenario;
|
|
1530
|
+
/**
|
|
1531
|
+
* Configures weight for this SDK object.
|
|
1532
|
+
* Use this when weight should be set explicitly before the run starts.
|
|
1533
|
+
*/
|
|
994
1534
|
withWeight(weight: number): LoadStrikeScenario;
|
|
1535
|
+
/**
|
|
1536
|
+
* Configures restart iteration on fail for this SDK object.
|
|
1537
|
+
* Use this when restart iteration on fail should be set explicitly before the run starts.
|
|
1538
|
+
*/
|
|
995
1539
|
withRestartIterationOnFail(shouldRestart: boolean): LoadStrikeScenario;
|
|
1540
|
+
/**
|
|
1541
|
+
* Configures cross platform tracking for this SDK object.
|
|
1542
|
+
* Use this when cross platform tracking should be set explicitly before the run starts.
|
|
1543
|
+
*/
|
|
996
1544
|
withCrossPlatformTracking(configuration: Record<string, unknown>): LoadStrikeScenario;
|
|
1545
|
+
/**
|
|
1546
|
+
* Configures load simulations for this SDK object.
|
|
1547
|
+
* Use this when load simulations should be set explicitly before the run starts.
|
|
1548
|
+
*/
|
|
997
1549
|
withLoadSimulations(...simulations: Array<Record<string, unknown>>): LoadStrikeScenario;
|
|
1550
|
+
/**
|
|
1551
|
+
* Configures thresholds for this SDK object.
|
|
1552
|
+
* Use this when thresholds should be set explicitly before the run starts.
|
|
1553
|
+
*/
|
|
998
1554
|
withThresholds(...thresholds: Array<Record<string, unknown>>): LoadStrikeScenario;
|
|
1555
|
+
/**
|
|
1556
|
+
* Returns simulations.
|
|
1557
|
+
* Use this when simulations is required for branching, logging, or assertions.
|
|
1558
|
+
*/
|
|
999
1559
|
getSimulations(): Array<Record<string, unknown>>;
|
|
1560
|
+
/**
|
|
1561
|
+
* Returns thresholds.
|
|
1562
|
+
* Use this when thresholds is required for branching, logging, or assertions.
|
|
1563
|
+
*/
|
|
1000
1564
|
getThresholds(): Array<Record<string, unknown>>;
|
|
1565
|
+
/**
|
|
1566
|
+
* Returns tracking configuration.
|
|
1567
|
+
* Use this when tracking configuration is required for branching, logging, or assertions.
|
|
1568
|
+
*/
|
|
1001
1569
|
getTrackingConfiguration(): Record<string, unknown> | undefined;
|
|
1570
|
+
/**
|
|
1571
|
+
* Returns max fail count.
|
|
1572
|
+
* Use this when max fail count is required for branching, logging, or assertions.
|
|
1573
|
+
*/
|
|
1002
1574
|
getMaxFailCount(): number;
|
|
1575
|
+
/**
|
|
1576
|
+
* Exposes the public isWithoutWarmUp operation.
|
|
1577
|
+
* Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
|
|
1578
|
+
*/
|
|
1003
1579
|
isWithoutWarmUp(): boolean;
|
|
1580
|
+
/**
|
|
1581
|
+
* Returns warm up duration seconds.
|
|
1582
|
+
* Use this when warm up duration seconds is required for branching, logging, or assertions.
|
|
1583
|
+
*/
|
|
1004
1584
|
getWarmUpDurationSeconds(): number;
|
|
1585
|
+
/**
|
|
1586
|
+
* Returns weight.
|
|
1587
|
+
* Use this when weight is required for branching, logging, or assertions.
|
|
1588
|
+
*/
|
|
1005
1589
|
getWeight(): number;
|
|
1590
|
+
/**
|
|
1591
|
+
* Exposes the public shouldRestartIterationOnFail operation.
|
|
1592
|
+
* Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
|
|
1593
|
+
*/
|
|
1006
1594
|
shouldRestartIterationOnFail(): boolean;
|
|
1007
1595
|
invokeInit(context: LoadStrikeScenarioInitContext): Promise<void>;
|
|
1008
1596
|
invokeClean(context: LoadStrikeScenarioInitContext): Promise<void>;
|
|
1009
1597
|
execute(context: LoadStrikeScenarioContext): Promise<LoadStrikeStepReply>;
|
|
1598
|
+
/**
|
|
1599
|
+
* Configures cross platform tracking for this SDK object.
|
|
1600
|
+
* Use this when cross platform tracking should be set explicitly before the run starts.
|
|
1601
|
+
*/
|
|
1010
1602
|
WithCrossPlatformTracking(configuration: Record<string, unknown>): LoadStrikeScenario;
|
|
1603
|
+
/**
|
|
1604
|
+
* Configures init for this SDK object.
|
|
1605
|
+
* Use this when init should be set explicitly before the run starts.
|
|
1606
|
+
*/
|
|
1011
1607
|
WithInit(handler: (context: LoadStrikeScenarioInitContext) => Promise<void> | void): LoadStrikeScenario;
|
|
1608
|
+
/**
|
|
1609
|
+
* Configures init async for this SDK object.
|
|
1610
|
+
* Use this when init async should be set explicitly before the run starts.
|
|
1611
|
+
*/
|
|
1012
1612
|
WithInitAsync(handler: (context: LoadStrikeScenarioInitContext) => Promise<void> | void): LoadStrikeScenario;
|
|
1613
|
+
/**
|
|
1614
|
+
* Configures clean for this SDK object.
|
|
1615
|
+
* Use this when clean should be set explicitly before the run starts.
|
|
1616
|
+
*/
|
|
1013
1617
|
WithClean(handler: (context: LoadStrikeScenarioInitContext) => Promise<void> | void): LoadStrikeScenario;
|
|
1618
|
+
/**
|
|
1619
|
+
* Configures clean async for this SDK object.
|
|
1620
|
+
* Use this when clean async should be set explicitly before the run starts.
|
|
1621
|
+
*/
|
|
1014
1622
|
WithCleanAsync(handler: (context: LoadStrikeScenarioInitContext) => Promise<void> | void): LoadStrikeScenario;
|
|
1623
|
+
/**
|
|
1624
|
+
* Configures load simulations for this SDK object.
|
|
1625
|
+
* Use this when load simulations should be set explicitly before the run starts.
|
|
1626
|
+
*/
|
|
1015
1627
|
WithLoadSimulations(...simulations: Array<Record<string, unknown>>): LoadStrikeScenario;
|
|
1628
|
+
/**
|
|
1629
|
+
* Configures max fail count for this SDK object.
|
|
1630
|
+
* Use this when max fail count should be set explicitly before the run starts.
|
|
1631
|
+
*/
|
|
1016
1632
|
WithMaxFailCount(maxFailCount: number): LoadStrikeScenario;
|
|
1633
|
+
/**
|
|
1634
|
+
* Configures out warm up for this SDK object.
|
|
1635
|
+
* Use this when out warm up should be set explicitly before the run starts.
|
|
1636
|
+
*/
|
|
1017
1637
|
WithoutWarmUp(): LoadStrikeScenario;
|
|
1638
|
+
/**
|
|
1639
|
+
* Configures restart iteration on fail for this SDK object.
|
|
1640
|
+
* Use this when restart iteration on fail should be set explicitly before the run starts.
|
|
1641
|
+
*/
|
|
1018
1642
|
WithRestartIterationOnFail(shouldRestart: boolean): LoadStrikeScenario;
|
|
1643
|
+
/**
|
|
1644
|
+
* Configures thresholds for this SDK object.
|
|
1645
|
+
* Use this when thresholds should be set explicitly before the run starts.
|
|
1646
|
+
*/
|
|
1019
1647
|
WithThresholds(...thresholds: Array<Record<string, unknown>>): LoadStrikeScenario;
|
|
1648
|
+
/**
|
|
1649
|
+
* Configures warm up duration for this SDK object.
|
|
1650
|
+
* Use this when warm up duration should be set explicitly before the run starts.
|
|
1651
|
+
*/
|
|
1020
1652
|
WithWarmUpDuration(durationSeconds: number): LoadStrikeScenario;
|
|
1653
|
+
/**
|
|
1654
|
+
* Configures weight for this SDK object.
|
|
1655
|
+
* Use this when weight should be set explicitly before the run starts.
|
|
1656
|
+
*/
|
|
1021
1657
|
WithWeight(weight: number): LoadStrikeScenario;
|
|
1022
1658
|
}
|
|
1023
1659
|
export declare class LoadStrikeRunner {
|
|
@@ -1025,69 +1661,301 @@ export declare class LoadStrikeRunner {
|
|
|
1025
1661
|
private options;
|
|
1026
1662
|
private contextConfigurators;
|
|
1027
1663
|
private constructor();
|
|
1664
|
+
/**
|
|
1665
|
+
* Creates a new instance of this public SDK type.
|
|
1666
|
+
* Use this when you are starting a run definition from scratch.
|
|
1667
|
+
*/
|
|
1028
1668
|
static create(): LoadStrikeRunner;
|
|
1669
|
+
/**
|
|
1670
|
+
* Creates a new instance of this public SDK type.
|
|
1671
|
+
* Use this when you are starting a run definition from scratch.
|
|
1672
|
+
*/
|
|
1029
1673
|
static Create(): LoadStrikeRunner;
|
|
1674
|
+
/**
|
|
1675
|
+
* Registers one or more scenarios on a fresh runnable context.
|
|
1676
|
+
* Use this when you want a context immediately without composing a runner first.
|
|
1677
|
+
*/
|
|
1030
1678
|
static registerScenarios(...scenarios: LoadStrikeScenario[]): LoadStrikeContext;
|
|
1679
|
+
/**
|
|
1680
|
+
* Registers one or more scenarios on a fresh runnable context.
|
|
1681
|
+
* Use this when you want a context immediately without composing a runner first.
|
|
1682
|
+
*/
|
|
1031
1683
|
static RegisterScenarios(...scenarios: LoadStrikeScenario[]): LoadStrikeContext;
|
|
1684
|
+
/**
|
|
1685
|
+
* Toggles realtime console metric output.
|
|
1686
|
+
* Use this when a local run or CI log should stream live throughput and latency updates.
|
|
1687
|
+
*/
|
|
1032
1688
|
static DisplayConsoleMetrics(context: LoadStrikeContext, enable: boolean): LoadStrikeContext;
|
|
1689
|
+
/**
|
|
1690
|
+
* Toggles local development cluster mode.
|
|
1691
|
+
* Use this when you want to simulate coordinator and agent behavior on a single machine.
|
|
1692
|
+
*/
|
|
1033
1693
|
static EnableLocalDevCluster(context: LoadStrikeContext, enable: boolean): LoadStrikeContext;
|
|
1694
|
+
/**
|
|
1695
|
+
* Loads run settings from a JSON config file.
|
|
1696
|
+
* Use this when configuration should come from a checked-in or generated config document.
|
|
1697
|
+
*/
|
|
1034
1698
|
static LoadConfig(context: LoadStrikeContext, path: string): LoadStrikeContext;
|
|
1699
|
+
/**
|
|
1700
|
+
* Loads infrastructure settings for sinks, plugins, or transport dependencies.
|
|
1701
|
+
* Use this when runtime integrations depend on external connection details.
|
|
1702
|
+
*/
|
|
1035
1703
|
static LoadInfraConfig(context: LoadStrikeContext, path: string): LoadStrikeContext;
|
|
1704
|
+
/**
|
|
1705
|
+
* Executes the configured workload through the SDK runtime.
|
|
1706
|
+
* Use this when configuration is complete and you are ready to start the run.
|
|
1707
|
+
*/
|
|
1036
1708
|
static Run(context: LoadStrikeContext, ...args: string[]): Promise<LoadStrikeRunResult>;
|
|
1709
|
+
/**
|
|
1710
|
+
* Sets the agent group for this node or run.
|
|
1711
|
+
* Use this when only a subset of agents should pick up a particular workload.
|
|
1712
|
+
*/
|
|
1037
1713
|
static WithAgentGroup(context: LoadStrikeContext, agentGroup: string): LoadStrikeContext;
|
|
1714
|
+
/**
|
|
1715
|
+
* Sets the requested agent count.
|
|
1716
|
+
* Use this when a coordinator should fan work out across a specific number of agents.
|
|
1717
|
+
*/
|
|
1038
1718
|
static WithAgentsCount(context: LoadStrikeContext, agentsCount: number): LoadStrikeContext;
|
|
1719
|
+
/**
|
|
1720
|
+
* Targets scenarios for agent nodes only.
|
|
1721
|
+
* Use this when agents should execute only a subset of the registered scenarios.
|
|
1722
|
+
*/
|
|
1039
1723
|
static WithAgentTargetScenarios(context: LoadStrikeContext, ...scenarioNames: string[]): LoadStrikeContext;
|
|
1724
|
+
/**
|
|
1725
|
+
* Sets the cluster identifier for this run.
|
|
1726
|
+
* Use this when multiple cluster nodes must join the same distributed execution.
|
|
1727
|
+
*/
|
|
1040
1728
|
static WithClusterId(context: LoadStrikeContext, clusterId: string): LoadStrikeContext;
|
|
1729
|
+
/**
|
|
1730
|
+
* Targets scenarios for the coordinator only.
|
|
1731
|
+
* Use this when orchestration or control-node work should run on the coordinator itself.
|
|
1732
|
+
*/
|
|
1041
1733
|
static WithCoordinatorTargetScenarios(context: LoadStrikeContext, ...scenarioNames: string[]): LoadStrikeContext;
|
|
1734
|
+
/**
|
|
1735
|
+
* Sets the runner key used for licensing validation.
|
|
1736
|
+
* Use this when the run must authenticate against the licensing API before it starts.
|
|
1737
|
+
*/
|
|
1042
1738
|
static WithRunnerKey(context: LoadStrikeContext, runnerKey: string): LoadStrikeContext;
|
|
1739
|
+
/**
|
|
1740
|
+
* Sets how long the SDK waits for licensing validation to complete.
|
|
1741
|
+
* Use this when control-plane latency or private networking requires a longer validation window.
|
|
1742
|
+
*/
|
|
1043
1743
|
static WithLicenseValidationTimeout(context: LoadStrikeContext, timeoutSeconds: number): LoadStrikeContext;
|
|
1744
|
+
/**
|
|
1745
|
+
* Supplies a custom logger configuration factory.
|
|
1746
|
+
* Use this when the default runtime logging output is not enough for your environment.
|
|
1747
|
+
*/
|
|
1044
1748
|
static WithLoggerConfig(context: LoadStrikeContext, loggerConfig: () => LoadStrikeLogger): LoadStrikeContext;
|
|
1749
|
+
/**
|
|
1750
|
+
* Sets the minimum runtime log level.
|
|
1751
|
+
* Use this when the run should emit less or more operational detail.
|
|
1752
|
+
*/
|
|
1045
1753
|
static WithMinimumLogLevel(context: LoadStrikeContext, minimumLogLevel: LoadStrikeLogLevel | string): LoadStrikeContext;
|
|
1754
|
+
/**
|
|
1755
|
+
* Sets the NATS server URL used for distributed cluster coordination.
|
|
1756
|
+
* Use this when coordinator and agent nodes communicate over NATS.
|
|
1757
|
+
*/
|
|
1046
1758
|
static WithNatsServerUrl(context: LoadStrikeContext, natsUrl: string): LoadStrikeContext;
|
|
1047
1759
|
static WithNodeType(context: LoadStrikeContext, nodeType: LoadStrikeNodeTypeInput): LoadStrikeContext;
|
|
1760
|
+
/**
|
|
1761
|
+
* Disables local report generation.
|
|
1762
|
+
* Use this when reports are unnecessary or should be handled exclusively by sinks.
|
|
1763
|
+
*/
|
|
1048
1764
|
static WithoutReports(context: LoadStrikeContext): LoadStrikeContext;
|
|
1765
|
+
/**
|
|
1766
|
+
* Sets the base file name for generated reports.
|
|
1767
|
+
* Use this when exported reports should use a predictable naming convention.
|
|
1768
|
+
*/
|
|
1049
1769
|
static WithReportFileName(context: LoadStrikeContext, reportFileName: string): LoadStrikeContext;
|
|
1770
|
+
/**
|
|
1771
|
+
* Sets the output folder for generated reports.
|
|
1772
|
+
* Use this when report files should land in a specific directory.
|
|
1773
|
+
*/
|
|
1050
1774
|
static WithReportFolder(context: LoadStrikeContext, reportFolderPath: string): LoadStrikeContext;
|
|
1051
1775
|
static WithReportFormats(context: LoadStrikeContext, ...reportFormats: Array<LoadStrikeReportFormat | string>): LoadStrikeContext;
|
|
1776
|
+
/**
|
|
1777
|
+
* Sets the realtime reporting cadence.
|
|
1778
|
+
* Use this when sinks or dashboards should receive updates at a controlled interval.
|
|
1779
|
+
*/
|
|
1052
1780
|
static WithReportingInterval(context: LoadStrikeContext, intervalSeconds: number): LoadStrikeContext;
|
|
1781
|
+
/**
|
|
1782
|
+
* Registers one or more reporting sinks.
|
|
1783
|
+
* Use this when run results must be pushed to external observability or storage systems.
|
|
1784
|
+
*/
|
|
1053
1785
|
static WithReportingSinks(context: LoadStrikeContext, ...sinks: ILoadStrikeReportingSink[]): LoadStrikeContext;
|
|
1786
|
+
/**
|
|
1787
|
+
* Registers runtime policies for the run.
|
|
1788
|
+
* Use this when scenario selection or step execution should obey policy callbacks.
|
|
1789
|
+
*/
|
|
1054
1790
|
static WithRuntimePolicies(context: LoadStrikeContext, ...policies: LoadStrikeRuntimePolicy[]): LoadStrikeContext;
|
|
1055
1791
|
static WithRuntimePolicyErrorMode(context: LoadStrikeContext, mode: LoadStrikeRuntimePolicyErrorMode | string): LoadStrikeContext;
|
|
1792
|
+
/**
|
|
1793
|
+
* Sets the timeout for scenario completion.
|
|
1794
|
+
* Use this when long-running scenarios need an explicit completion window.
|
|
1795
|
+
*/
|
|
1056
1796
|
static WithScenarioCompletionTimeout(context: LoadStrikeContext, timeoutSeconds: number): LoadStrikeContext;
|
|
1797
|
+
/**
|
|
1798
|
+
* Sets the timeout for cluster command round-trips.
|
|
1799
|
+
* Use this when distributed control messages need a tighter or looser deadline.
|
|
1800
|
+
*/
|
|
1057
1801
|
static WithClusterCommandTimeout(context: LoadStrikeContext, timeoutSeconds: number): LoadStrikeContext;
|
|
1802
|
+
/**
|
|
1803
|
+
* Sets the retry limit for restartable failed iterations.
|
|
1804
|
+
* Use this when transient failures should be retried a fixed number of times.
|
|
1805
|
+
*/
|
|
1058
1806
|
static WithRestartIterationMaxAttempts(context: LoadStrikeContext, attempts: number): LoadStrikeContext;
|
|
1807
|
+
/**
|
|
1808
|
+
* Sets the session identifier for this run.
|
|
1809
|
+
* Use this when downstream logs, reports, or external systems need a stable session id.
|
|
1810
|
+
*/
|
|
1059
1811
|
static WithSessionId(context: LoadStrikeContext, sessionId: string): LoadStrikeContext;
|
|
1812
|
+
/**
|
|
1813
|
+
* Targets a shared set of scenarios.
|
|
1814
|
+
* Use this when only selected scenarios should execute for the current node or run.
|
|
1815
|
+
*/
|
|
1060
1816
|
static WithTargetScenarios(context: LoadStrikeContext, ...scenarioNames: string[]): LoadStrikeContext;
|
|
1817
|
+
/**
|
|
1818
|
+
* Sets the test name label for the run.
|
|
1819
|
+
* Use this when reports and logs should expose a human-readable test identifier.
|
|
1820
|
+
*/
|
|
1061
1821
|
static WithTestName(context: LoadStrikeContext, testName: string): LoadStrikeContext;
|
|
1822
|
+
/**
|
|
1823
|
+
* Sets the test suite label for the run.
|
|
1824
|
+
* Use this when related tests should be grouped under a suite name.
|
|
1825
|
+
*/
|
|
1062
1826
|
static WithTestSuite(context: LoadStrikeContext, testSuite: string): LoadStrikeContext;
|
|
1827
|
+
/**
|
|
1828
|
+
* Registers worker plugins for the run.
|
|
1829
|
+
* Use this when custom plugin data should be collected alongside run results.
|
|
1830
|
+
*/
|
|
1063
1831
|
static WithWorkerPlugins(context: LoadStrikeContext, ...plugins: ILoadStrikeWorkerPlugin[]): LoadStrikeContext;
|
|
1832
|
+
/**
|
|
1833
|
+
* Adds a scenario to the current runner.
|
|
1834
|
+
* Use this when the run should include one more scenario definition.
|
|
1835
|
+
*/
|
|
1064
1836
|
addScenario(scenario: LoadStrikeScenario): LoadStrikeRunner;
|
|
1837
|
+
/**
|
|
1838
|
+
* Adds a scenario to the current runner.
|
|
1839
|
+
* Use this when the run should include one more scenario definition.
|
|
1840
|
+
*/
|
|
1065
1841
|
AddScenario(scenario: LoadStrikeScenario): LoadStrikeRunner;
|
|
1842
|
+
/**
|
|
1843
|
+
* Adds multiple scenarios to the current runner.
|
|
1844
|
+
* Use this when the run should execute a batch of scenario definitions together.
|
|
1845
|
+
*/
|
|
1066
1846
|
addScenarios(...scenarios: LoadStrikeScenario[]): LoadStrikeRunner;
|
|
1847
|
+
/**
|
|
1848
|
+
* Adds multiple scenarios to the current runner.
|
|
1849
|
+
* Use this when the run should execute a batch of scenario definitions together.
|
|
1850
|
+
*/
|
|
1067
1851
|
AddScenarios(...scenarios: LoadStrikeScenario[]): LoadStrikeRunner;
|
|
1852
|
+
/**
|
|
1853
|
+
* Applies a grouped configuration change to the current builder or context.
|
|
1854
|
+
* Use this when several related settings should be supplied in one step.
|
|
1855
|
+
*/
|
|
1068
1856
|
configure(options: LoadStrikeRunnerOptions): LoadStrikeRunner;
|
|
1069
1857
|
Configure(configure: (context: LoadStrikeContext) => LoadStrikeContext): LoadStrikeRunner;
|
|
1070
1858
|
Configure(context: LoadStrikeContext | LoadStrikeRunContext): LoadStrikeRunner;
|
|
1071
1859
|
Configure(options: LoadStrikeRunnerOptions): LoadStrikeRunner;
|
|
1860
|
+
/**
|
|
1861
|
+
* Copies settings from an existing context snapshot.
|
|
1862
|
+
* Use this when a runner should inherit configuration that was already assembled elsewhere.
|
|
1863
|
+
*/
|
|
1072
1864
|
configureContext(context: LoadStrikeContext | LoadStrikeRunContext): LoadStrikeRunner;
|
|
1865
|
+
/**
|
|
1866
|
+
* Copies settings from an existing context snapshot.
|
|
1867
|
+
* Use this when a runner should inherit configuration that was already assembled elsewhere.
|
|
1868
|
+
*/
|
|
1073
1869
|
ConfigureContext(context: LoadStrikeContext | LoadStrikeRunContext): LoadStrikeRunner;
|
|
1870
|
+
/**
|
|
1871
|
+
* Sets the test suite label for the run.
|
|
1872
|
+
* Use this when related tests should be grouped under a suite name.
|
|
1873
|
+
*/
|
|
1074
1874
|
withTestSuite(testSuite: string): LoadStrikeRunner;
|
|
1875
|
+
/**
|
|
1876
|
+
* Sets the test suite label for the run.
|
|
1877
|
+
* Use this when related tests should be grouped under a suite name.
|
|
1878
|
+
*/
|
|
1075
1879
|
WithTestSuite(testSuite: string): LoadStrikeRunner;
|
|
1880
|
+
/**
|
|
1881
|
+
* Sets the test name label for the run.
|
|
1882
|
+
* Use this when reports and logs should expose a human-readable test identifier.
|
|
1883
|
+
*/
|
|
1076
1884
|
withTestName(testName: string): LoadStrikeRunner;
|
|
1885
|
+
/**
|
|
1886
|
+
* Sets the test name label for the run.
|
|
1887
|
+
* Use this when reports and logs should expose a human-readable test identifier.
|
|
1888
|
+
*/
|
|
1077
1889
|
WithTestName(testName: string): LoadStrikeRunner;
|
|
1890
|
+
/**
|
|
1891
|
+
* Sets the session identifier for this run.
|
|
1892
|
+
* Use this when downstream logs, reports, or external systems need a stable session id.
|
|
1893
|
+
*/
|
|
1078
1894
|
withSessionId(sessionId: string): LoadStrikeRunner;
|
|
1895
|
+
/**
|
|
1896
|
+
* Sets the session identifier for this run.
|
|
1897
|
+
* Use this when downstream logs, reports, or external systems need a stable session id.
|
|
1898
|
+
*/
|
|
1079
1899
|
WithSessionId(sessionId: string): LoadStrikeRunner;
|
|
1900
|
+
/**
|
|
1901
|
+
* Sets the output folder for generated reports.
|
|
1902
|
+
* Use this when report files should land in a specific directory.
|
|
1903
|
+
*/
|
|
1080
1904
|
withReportFolder(reportFolderPath: string): LoadStrikeRunner;
|
|
1905
|
+
/**
|
|
1906
|
+
* Sets the output folder for generated reports.
|
|
1907
|
+
* Use this when report files should land in a specific directory.
|
|
1908
|
+
*/
|
|
1081
1909
|
WithReportFolder(reportFolderPath: string): LoadStrikeRunner;
|
|
1910
|
+
/**
|
|
1911
|
+
* Sets the realtime reporting cadence.
|
|
1912
|
+
* Use this when sinks or dashboards should receive updates at a controlled interval.
|
|
1913
|
+
*/
|
|
1082
1914
|
withReportingInterval(intervalSeconds: number): LoadStrikeRunner;
|
|
1915
|
+
/**
|
|
1916
|
+
* Sets the realtime reporting cadence.
|
|
1917
|
+
* Use this when sinks or dashboards should receive updates at a controlled interval.
|
|
1918
|
+
*/
|
|
1083
1919
|
WithReportingInterval(intervalSeconds: number): LoadStrikeRunner;
|
|
1920
|
+
/**
|
|
1921
|
+
* Sets the timeout for cluster command round-trips.
|
|
1922
|
+
* Use this when distributed control messages need a tighter or looser deadline.
|
|
1923
|
+
*/
|
|
1084
1924
|
withClusterCommandTimeout(timeoutSeconds: number): LoadStrikeRunner;
|
|
1925
|
+
/**
|
|
1926
|
+
* Sets the timeout for cluster command round-trips.
|
|
1927
|
+
* Use this when distributed control messages need a tighter or looser deadline.
|
|
1928
|
+
*/
|
|
1085
1929
|
WithClusterCommandTimeout(timeoutSeconds: number): LoadStrikeRunner;
|
|
1930
|
+
/**
|
|
1931
|
+
* Sets the retry limit for restartable failed iterations.
|
|
1932
|
+
* Use this when transient failures should be retried a fixed number of times.
|
|
1933
|
+
*/
|
|
1086
1934
|
withRestartIterationMaxAttempts(attempts: number): LoadStrikeRunner;
|
|
1935
|
+
/**
|
|
1936
|
+
* Sets the retry limit for restartable failed iterations.
|
|
1937
|
+
* Use this when transient failures should be retried a fixed number of times.
|
|
1938
|
+
*/
|
|
1087
1939
|
WithRestartIterationMaxAttempts(attempts: number): LoadStrikeRunner;
|
|
1940
|
+
/**
|
|
1941
|
+
* Disables local report generation.
|
|
1942
|
+
* Use this when reports are unnecessary or should be handled exclusively by sinks.
|
|
1943
|
+
*/
|
|
1088
1944
|
withoutReports(): LoadStrikeRunner;
|
|
1945
|
+
/**
|
|
1946
|
+
* Disables local report generation.
|
|
1947
|
+
* Use this when reports are unnecessary or should be handled exclusively by sinks.
|
|
1948
|
+
*/
|
|
1089
1949
|
WithoutReports(): LoadStrikeRunner;
|
|
1950
|
+
/**
|
|
1951
|
+
* Builds the current configuration into a runnable context.
|
|
1952
|
+
* Use this when you want to inspect or reuse the final run settings before execution.
|
|
1953
|
+
*/
|
|
1090
1954
|
buildContext(): LoadStrikeContext;
|
|
1955
|
+
/**
|
|
1956
|
+
* Builds the current configuration into a runnable context.
|
|
1957
|
+
* Use this when you want to inspect or reuse the final run settings before execution.
|
|
1958
|
+
*/
|
|
1091
1959
|
BuildContext(): LoadStrikeContext;
|
|
1092
1960
|
run(args?: string[]): Promise<LoadStrikeRunResult>;
|
|
1093
1961
|
Run(args?: string[]): Promise<LoadStrikeRunResult>;
|