@loadstrike/loadstrike-sdk 1.0.21101 → 1.0.21301
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 +9 -2
- package/dist/cjs/autopilot-contracts.js +11 -0
- package/dist/cjs/autopilot.js +717 -0
- package/dist/cjs/index.js +7 -2
- package/dist/cjs/local.js +3 -0
- package/dist/cjs/runtime.js +37 -22
- package/dist/esm/autopilot-contracts.js +8 -0
- package/dist/esm/autopilot.js +709 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/local.js +3 -0
- package/dist/esm/runtime.js +37 -22
- package/dist/types/autopilot-contracts.d.ts +113 -0
- package/dist/types/autopilot.d.ts +43 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/runtime.d.ts +3 -0
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { LoadStrikeAutopilot, LoadStrikeAutopilotResult } from "./autopilot.js";
|
|
2
|
+
export { LoadStrikeAutopilotReadiness } from "./autopilot-contracts.js";
|
|
1
3
|
export { CrossPlatformScenarioConfigurator, ScenarioTrackingExtensions, LoadStrikeContext, LoadStrikePluginData, LoadStrikePluginDataTable, LoadStrikeNodeType, LoadStrikeReportFormat, LoadStrikeResponse, LoadStrikeLogLevel, LoadStrikeScenarioOperation, LoadStrikeOperationType, LoadStrikeRunner, LoadStrikeScenario, LoadStrikeSimulation, LoadStrikeMetric, LoadStrikeCounter, LoadStrikeGauge, LoadStrikeStep, LoadStrikeThreshold } from "./runtime.js";
|
|
2
4
|
export { CorrelationStoreConfiguration, CrossPlatformTrackingRuntime, InMemoryCorrelationStore, RedisCorrelationStoreOptions, RedisCorrelationStore, TrackingPayloadBuilder, TrackingFieldSelector } from "./correlation.js";
|
|
3
5
|
export { EndpointAdapterFactory, TrafficEndpointDefinition, HttpEndpointDefinition, KafkaEndpointDefinition, KafkaSaslOptions, RabbitMqEndpointDefinition, NatsEndpointDefinition, RedisStreamsEndpointDefinition, AzureEventHubsEndpointDefinition, DelegateStreamEndpointDefinition, PushDiffusionEndpointDefinition, HttpOAuth2ClientCredentialsOptions, HttpAuthOptions } from "./transports.js";
|
package/dist/esm/local.js
CHANGED
|
@@ -549,6 +549,9 @@ function collectRequestedFeatures(request) {
|
|
|
549
549
|
}
|
|
550
550
|
for (const scenarioValue of scenarios) {
|
|
551
551
|
const scenario = asRecord(scenarioValue);
|
|
552
|
+
for (const feature of normalizeStringArray(pickValue(scenario, "InternalLicenseFeatures", "internalLicenseFeatures"))) {
|
|
553
|
+
features.add(feature);
|
|
554
|
+
}
|
|
552
555
|
if (asList(scenario.Thresholds).length > 0) {
|
|
553
556
|
features.add("policy.report_finalizer_and_threshold_controls");
|
|
554
557
|
}
|
package/dist/esm/runtime.js
CHANGED
|
@@ -1566,7 +1566,7 @@ export class LoadStrikeContext {
|
|
|
1566
1566
|
}
|
|
1567
1567
|
}
|
|
1568
1568
|
export class LoadStrikeScenario {
|
|
1569
|
-
constructor(name, runHandler, initHandler, cleanHandler, loadSimulations, thresholds, trackingConfiguration, maxFailCount, withoutWarmUpValue, warmUpDurationSeconds, weight, restartIterationOnFail) {
|
|
1569
|
+
constructor(name, runHandler, initHandler, cleanHandler, loadSimulations, thresholds, trackingConfiguration, maxFailCount, withoutWarmUpValue, warmUpDurationSeconds, weight, restartIterationOnFail, internalLicenseFeatures = []) {
|
|
1570
1570
|
this.name = name;
|
|
1571
1571
|
this.runHandler = runHandler;
|
|
1572
1572
|
this.initHandler = initHandler;
|
|
@@ -1579,6 +1579,7 @@ export class LoadStrikeScenario {
|
|
|
1579
1579
|
this.warmUpDurationSeconds = warmUpDurationSeconds;
|
|
1580
1580
|
this.weight = weight;
|
|
1581
1581
|
this.restartIterationOnFail = restartIterationOnFail;
|
|
1582
|
+
this.internalLicenseFeatures = normalizeStringArray(internalLicenseFeatures);
|
|
1582
1583
|
}
|
|
1583
1584
|
static create(name, runHandler) {
|
|
1584
1585
|
const scenarioName = requireNonEmpty(name, "Scenario name must be provided.");
|
|
@@ -1621,7 +1622,7 @@ export class LoadStrikeScenario {
|
|
|
1621
1622
|
if (typeof handler !== "function") {
|
|
1622
1623
|
throw new TypeError("Init handler must be provided.");
|
|
1623
1624
|
}
|
|
1624
|
-
return new LoadStrikeScenario(this.name, this.runHandler, handler, this.cleanHandler, this.loadSimulations, this.thresholds, this.trackingConfiguration, this.maxFailCount, this.withoutWarmUpValue, this.warmUpDurationSeconds, this.weight, this.restartIterationOnFail);
|
|
1625
|
+
return new LoadStrikeScenario(this.name, this.runHandler, handler, this.cleanHandler, this.loadSimulations, this.thresholds, this.trackingConfiguration, this.maxFailCount, this.withoutWarmUpValue, this.warmUpDurationSeconds, this.weight, this.restartIterationOnFail, this.internalLicenseFeatures);
|
|
1625
1626
|
}
|
|
1626
1627
|
/**
|
|
1627
1628
|
* Configures init async for this SDK object.
|
|
@@ -1638,7 +1639,7 @@ export class LoadStrikeScenario {
|
|
|
1638
1639
|
if (typeof handler !== "function") {
|
|
1639
1640
|
throw new TypeError("Clean handler must be provided.");
|
|
1640
1641
|
}
|
|
1641
|
-
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, handler, this.loadSimulations, this.thresholds, this.trackingConfiguration, this.maxFailCount, this.withoutWarmUpValue, this.warmUpDurationSeconds, this.weight, this.restartIterationOnFail);
|
|
1642
|
+
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, handler, this.loadSimulations, this.thresholds, this.trackingConfiguration, this.maxFailCount, this.withoutWarmUpValue, this.warmUpDurationSeconds, this.weight, this.restartIterationOnFail, this.internalLicenseFeatures);
|
|
1642
1643
|
}
|
|
1643
1644
|
/**
|
|
1644
1645
|
* Configures clean async for this SDK object.
|
|
@@ -1655,14 +1656,14 @@ export class LoadStrikeScenario {
|
|
|
1655
1656
|
if (!Number.isFinite(maxFailCount)) {
|
|
1656
1657
|
throw new RangeError("maxFailCount should be a finite number.");
|
|
1657
1658
|
}
|
|
1658
|
-
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, this.loadSimulations, this.thresholds, this.trackingConfiguration, Math.trunc(maxFailCount), this.withoutWarmUpValue, this.warmUpDurationSeconds, this.weight, this.restartIterationOnFail);
|
|
1659
|
+
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, this.loadSimulations, this.thresholds, this.trackingConfiguration, Math.trunc(maxFailCount), this.withoutWarmUpValue, this.warmUpDurationSeconds, this.weight, this.restartIterationOnFail, this.internalLicenseFeatures);
|
|
1659
1660
|
}
|
|
1660
1661
|
/**
|
|
1661
1662
|
* Configures out warm up for this SDK object.
|
|
1662
1663
|
* Use this when out warm up should be set explicitly before the run starts.
|
|
1663
1664
|
*/
|
|
1664
1665
|
withoutWarmUp() {
|
|
1665
|
-
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, this.loadSimulations, this.thresholds, this.trackingConfiguration, this.maxFailCount, true, this.warmUpDurationSeconds, this.weight, this.restartIterationOnFail);
|
|
1666
|
+
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, this.loadSimulations, this.thresholds, this.trackingConfiguration, this.maxFailCount, true, this.warmUpDurationSeconds, this.weight, this.restartIterationOnFail, this.internalLicenseFeatures);
|
|
1666
1667
|
}
|
|
1667
1668
|
/**
|
|
1668
1669
|
* Configures warm up duration for this SDK object.
|
|
@@ -1672,7 +1673,7 @@ export class LoadStrikeScenario {
|
|
|
1672
1673
|
if (!Number.isFinite(durationSeconds)) {
|
|
1673
1674
|
throw new RangeError("Warmup duration should be a finite number.");
|
|
1674
1675
|
}
|
|
1675
|
-
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, this.loadSimulations, this.thresholds, this.trackingConfiguration, this.maxFailCount, this.withoutWarmUpValue, durationSeconds, this.weight, this.restartIterationOnFail);
|
|
1676
|
+
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, this.loadSimulations, this.thresholds, this.trackingConfiguration, this.maxFailCount, this.withoutWarmUpValue, durationSeconds, this.weight, this.restartIterationOnFail, this.internalLicenseFeatures);
|
|
1676
1677
|
}
|
|
1677
1678
|
/**
|
|
1678
1679
|
* Configures weight for this SDK object.
|
|
@@ -1682,14 +1683,14 @@ export class LoadStrikeScenario {
|
|
|
1682
1683
|
if (!Number.isFinite(weight)) {
|
|
1683
1684
|
throw new RangeError("Weight should be a finite number.");
|
|
1684
1685
|
}
|
|
1685
|
-
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, this.loadSimulations, this.thresholds, this.trackingConfiguration, this.maxFailCount, this.withoutWarmUpValue, this.warmUpDurationSeconds, Math.trunc(weight), this.restartIterationOnFail);
|
|
1686
|
+
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, this.loadSimulations, this.thresholds, this.trackingConfiguration, this.maxFailCount, this.withoutWarmUpValue, this.warmUpDurationSeconds, Math.trunc(weight), this.restartIterationOnFail, this.internalLicenseFeatures);
|
|
1686
1687
|
}
|
|
1687
1688
|
/**
|
|
1688
1689
|
* Configures restart iteration on fail for this SDK object.
|
|
1689
1690
|
* Use this when restart iteration on fail should be set explicitly before the run starts.
|
|
1690
1691
|
*/
|
|
1691
1692
|
withRestartIterationOnFail(shouldRestart) {
|
|
1692
|
-
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, this.loadSimulations, this.thresholds, this.trackingConfiguration, this.maxFailCount, this.withoutWarmUpValue, this.warmUpDurationSeconds, this.weight, Boolean(shouldRestart));
|
|
1693
|
+
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, this.loadSimulations, this.thresholds, this.trackingConfiguration, this.maxFailCount, this.withoutWarmUpValue, this.warmUpDurationSeconds, this.weight, Boolean(shouldRestart), this.internalLicenseFeatures);
|
|
1693
1694
|
}
|
|
1694
1695
|
/**
|
|
1695
1696
|
* Configures cross platform tracking for this SDK object.
|
|
@@ -1710,7 +1711,7 @@ export class LoadStrikeScenario {
|
|
|
1710
1711
|
? mapRuntimeTrackingEndpointSpec(destinationSpec)
|
|
1711
1712
|
: null;
|
|
1712
1713
|
validateRuntimeTrackingConfiguration(copied, sourceEndpoint, destinationEndpoint);
|
|
1713
|
-
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, this.loadSimulations, this.thresholds, copied, this.maxFailCount, this.withoutWarmUpValue, this.warmUpDurationSeconds, this.weight, this.restartIterationOnFail);
|
|
1714
|
+
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, this.loadSimulations, this.thresholds, copied, this.maxFailCount, this.withoutWarmUpValue, this.warmUpDurationSeconds, this.weight, this.restartIterationOnFail, this.internalLicenseFeatures);
|
|
1714
1715
|
}
|
|
1715
1716
|
/**
|
|
1716
1717
|
* Configures load simulations for this SDK object.
|
|
@@ -1720,7 +1721,7 @@ export class LoadStrikeScenario {
|
|
|
1720
1721
|
if (!simulations.length) {
|
|
1721
1722
|
throw new Error("At least one load simulation should be provided.");
|
|
1722
1723
|
}
|
|
1723
|
-
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, simulations.map((simulation) => attachLoadSimulationProjection({ ...simulation })), this.thresholds, this.trackingConfiguration, this.maxFailCount, this.withoutWarmUpValue, this.warmUpDurationSeconds, this.weight, this.restartIterationOnFail);
|
|
1724
|
+
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, simulations.map((simulation) => attachLoadSimulationProjection({ ...simulation })), this.thresholds, this.trackingConfiguration, this.maxFailCount, this.withoutWarmUpValue, this.warmUpDurationSeconds, this.weight, this.restartIterationOnFail, this.internalLicenseFeatures);
|
|
1724
1725
|
}
|
|
1725
1726
|
/**
|
|
1726
1727
|
* Configures thresholds for this SDK object.
|
|
@@ -1730,7 +1731,7 @@ export class LoadStrikeScenario {
|
|
|
1730
1731
|
if (!thresholds.length) {
|
|
1731
1732
|
throw new Error("At least one threshold should be provided.");
|
|
1732
1733
|
}
|
|
1733
|
-
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, this.loadSimulations, thresholds.map((threshold) => ({ ...threshold })), this.trackingConfiguration, this.maxFailCount, this.withoutWarmUpValue, this.warmUpDurationSeconds, this.weight, this.restartIterationOnFail);
|
|
1734
|
+
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, this.loadSimulations, thresholds.map((threshold) => ({ ...threshold })), this.trackingConfiguration, this.maxFailCount, this.withoutWarmUpValue, this.warmUpDurationSeconds, this.weight, this.restartIterationOnFail, this.internalLicenseFeatures);
|
|
1734
1735
|
}
|
|
1735
1736
|
/**
|
|
1736
1737
|
* Returns simulations.
|
|
@@ -1788,6 +1789,13 @@ export class LoadStrikeScenario {
|
|
|
1788
1789
|
shouldRestartIterationOnFail() {
|
|
1789
1790
|
return this.restartIterationOnFail;
|
|
1790
1791
|
}
|
|
1792
|
+
__loadStrikeInternalLicenseFeatures() {
|
|
1793
|
+
return [...this.internalLicenseFeatures];
|
|
1794
|
+
}
|
|
1795
|
+
__loadStrikeWithInternalLicenseFeatures(...features) {
|
|
1796
|
+
const merged = Array.from(new Set([...this.internalLicenseFeatures, ...normalizeStringArray(features)]));
|
|
1797
|
+
return new LoadStrikeScenario(this.name, this.runHandler, this.initHandler, this.cleanHandler, this.loadSimulations, this.thresholds, this.trackingConfiguration, this.maxFailCount, this.withoutWarmUpValue, this.warmUpDurationSeconds, this.weight, this.restartIterationOnFail, merged);
|
|
1798
|
+
}
|
|
1791
1799
|
async invokeInit(context) {
|
|
1792
1800
|
if (this.initHandler) {
|
|
1793
1801
|
await this.initHandler(context);
|
|
@@ -7455,17 +7463,24 @@ function buildLicenseValidationPayload(options, scenarios) {
|
|
|
7455
7463
|
const context = {
|
|
7456
7464
|
...toRunContext(options)
|
|
7457
7465
|
};
|
|
7458
|
-
const scenarioSpecs = scenarios.map((scenario) =>
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7466
|
+
const scenarioSpecs = scenarios.map((scenario) => {
|
|
7467
|
+
const row = {
|
|
7468
|
+
Name: scenario.name,
|
|
7469
|
+
MaxFailCount: scenario.getMaxFailCount(),
|
|
7470
|
+
RestartIterationOnFail: scenario.shouldRestartIterationOnFail(),
|
|
7471
|
+
WithoutWarmUp: scenario.isWithoutWarmUp(),
|
|
7472
|
+
WarmUpDurationSeconds: scenario.getWarmUpDurationSeconds(),
|
|
7473
|
+
Weight: scenario.getWeight(),
|
|
7474
|
+
LoadSimulations: [...scenario.getSimulations()],
|
|
7475
|
+
Thresholds: [...scenario.getThresholds()],
|
|
7476
|
+
Tracking: scenario.getTrackingConfiguration() ?? {}
|
|
7477
|
+
};
|
|
7478
|
+
const internalLicenseFeatures = scenario.__loadStrikeInternalLicenseFeatures();
|
|
7479
|
+
if (internalLicenseFeatures.length > 0) {
|
|
7480
|
+
row.InternalLicenseFeatures = internalLicenseFeatures;
|
|
7481
|
+
}
|
|
7482
|
+
return row;
|
|
7483
|
+
});
|
|
7469
7484
|
return {
|
|
7470
7485
|
Context: context,
|
|
7471
7486
|
Scenarios: scenarioSpecs,
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { LoadStrikeScenario } from "./runtime.js";
|
|
2
|
+
export interface LoadStrikeAutopilotRequest {
|
|
3
|
+
Kind: string;
|
|
4
|
+
FilePath?: string;
|
|
5
|
+
Content?: string;
|
|
6
|
+
SourceMessage?: LoadStrikeAutopilotMessageSample;
|
|
7
|
+
DestinationMessage?: LoadStrikeAutopilotMessageSample;
|
|
8
|
+
Options?: LoadStrikeAutopilotOptions;
|
|
9
|
+
}
|
|
10
|
+
export interface LoadStrikeAutopilotOptions {
|
|
11
|
+
ScenarioName?: string;
|
|
12
|
+
IncludePreviewReport?: boolean;
|
|
13
|
+
AllowedReplayHosts?: string[];
|
|
14
|
+
BaseUrlRewrite?: string;
|
|
15
|
+
TrackingSelector?: string;
|
|
16
|
+
SecretBindings?: LoadStrikeAutopilotSecretBinding[];
|
|
17
|
+
EndpointBindings?: LoadStrikeAutopilotEndpointBinding[];
|
|
18
|
+
}
|
|
19
|
+
export interface LoadStrikeAutopilotSecretBinding {
|
|
20
|
+
Location: string;
|
|
21
|
+
ValueFromEnv: string;
|
|
22
|
+
}
|
|
23
|
+
export interface LoadStrikeAutopilotEndpointBinding {
|
|
24
|
+
Name: string;
|
|
25
|
+
Kind?: string;
|
|
26
|
+
Method?: string;
|
|
27
|
+
Url?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface LoadStrikeAutopilotMessageSample {
|
|
30
|
+
name?: string;
|
|
31
|
+
Name?: string;
|
|
32
|
+
contentType?: string;
|
|
33
|
+
ContentType?: string;
|
|
34
|
+
headers?: Record<string, string>;
|
|
35
|
+
Headers?: Record<string, string>;
|
|
36
|
+
payload?: unknown;
|
|
37
|
+
Payload?: unknown;
|
|
38
|
+
transportMetadata?: Record<string, string>;
|
|
39
|
+
TransportMetadata?: Record<string, string>;
|
|
40
|
+
}
|
|
41
|
+
export interface LoadStrikeAutopilotPlan {
|
|
42
|
+
Version: string;
|
|
43
|
+
Scenario: LoadStrikeAutopilotScenarioPlan;
|
|
44
|
+
Endpoints: LoadStrikeAutopilotEndpoint[];
|
|
45
|
+
TrackingSelectorSuggestions: LoadStrikeAutopilotTrackingSelectorSuggestion[];
|
|
46
|
+
ThresholdSuggestions: LoadStrikeAutopilotThresholdSuggestion[];
|
|
47
|
+
Redactions: LoadStrikeAutopilotRedaction[];
|
|
48
|
+
Warnings: string[];
|
|
49
|
+
Confidence: number;
|
|
50
|
+
}
|
|
51
|
+
export interface LoadStrikeAutopilotScenarioPlan {
|
|
52
|
+
Name: string;
|
|
53
|
+
WithoutWarmUp: boolean;
|
|
54
|
+
LoadSimulationSuggestions: LoadStrikeAutopilotLoadSimulationSuggestion[];
|
|
55
|
+
}
|
|
56
|
+
export interface LoadStrikeAutopilotLoadSimulationSuggestion {
|
|
57
|
+
Kind: "IterationsForConstant";
|
|
58
|
+
Copies: number;
|
|
59
|
+
Iterations: number;
|
|
60
|
+
}
|
|
61
|
+
export interface LoadStrikeAutopilotThresholdSuggestion {
|
|
62
|
+
Kind: "AllFailCount" | "LatencyP95Ms" | "LatencyP99Ms";
|
|
63
|
+
Maximum: number;
|
|
64
|
+
}
|
|
65
|
+
export interface LoadStrikeAutopilotTrackingSelectorSuggestion {
|
|
66
|
+
Expression: string;
|
|
67
|
+
Confidence: number;
|
|
68
|
+
}
|
|
69
|
+
export interface LoadStrikeAutopilotEndpoint {
|
|
70
|
+
Kind: string;
|
|
71
|
+
Name: string;
|
|
72
|
+
Method?: string;
|
|
73
|
+
Url?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface LoadStrikeAutopilotRedaction {
|
|
76
|
+
Location: string;
|
|
77
|
+
Reason: string;
|
|
78
|
+
Replacement: "[REDACTED]";
|
|
79
|
+
}
|
|
80
|
+
export interface LoadStrikeAutopilotReadinessFailure {
|
|
81
|
+
Readiness: string;
|
|
82
|
+
Reason: string;
|
|
83
|
+
RequiredInput: string;
|
|
84
|
+
Locations: string[];
|
|
85
|
+
}
|
|
86
|
+
export interface LoadStrikeAutopilotPreviewReport {
|
|
87
|
+
ScenarioName: string;
|
|
88
|
+
Readiness: string;
|
|
89
|
+
Signals: string[];
|
|
90
|
+
Warnings: string[];
|
|
91
|
+
ReadinessFailures: LoadStrikeAutopilotReadinessFailure[];
|
|
92
|
+
Redactions: LoadStrikeAutopilotRedaction[];
|
|
93
|
+
}
|
|
94
|
+
export interface LoadStrikeAutopilotResultShape {
|
|
95
|
+
Readiness: string;
|
|
96
|
+
Plan: LoadStrikeAutopilotPlan;
|
|
97
|
+
Endpoints: LoadStrikeAutopilotEndpoint[];
|
|
98
|
+
Redactions: LoadStrikeAutopilotRedaction[];
|
|
99
|
+
Warnings: string[];
|
|
100
|
+
ReadinessFailures: LoadStrikeAutopilotReadinessFailure[];
|
|
101
|
+
PreviewReport?: LoadStrikeAutopilotPreviewReport;
|
|
102
|
+
ObservedLatencyMs?: number;
|
|
103
|
+
buildScenario(): LoadStrikeScenario;
|
|
104
|
+
BuildScenario(): LoadStrikeScenario;
|
|
105
|
+
}
|
|
106
|
+
export declare const LoadStrikeAutopilotReadiness: {
|
|
107
|
+
readonly Ready: "Ready";
|
|
108
|
+
readonly RequiresSecrets: "RequiresSecrets";
|
|
109
|
+
readonly RequiresEndpointBinding: "RequiresEndpointBinding";
|
|
110
|
+
readonly RequiresTargetBinding: "RequiresTargetBinding";
|
|
111
|
+
readonly RequiresTrackingSelector: "RequiresTrackingSelector";
|
|
112
|
+
readonly RequiresReview: "RequiresReview";
|
|
113
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { LoadStrikeScenario } from "./runtime.js";
|
|
2
|
+
import { type LoadStrikeAutopilotEndpoint, type LoadStrikeAutopilotOptions, type LoadStrikeAutopilotPlan, type LoadStrikeAutopilotPreviewReport, type LoadStrikeAutopilotReadinessFailure, type LoadStrikeAutopilotRedaction, type LoadStrikeAutopilotRequest, type LoadStrikeAutopilotResultShape, type LoadStrikeAutopilotThresholdSuggestion, type LoadStrikeAutopilotTrackingSelectorSuggestion } from "./autopilot-contracts.js";
|
|
3
|
+
interface AutopilotHttpRequest {
|
|
4
|
+
method: string;
|
|
5
|
+
url: string;
|
|
6
|
+
headers: Record<string, string>;
|
|
7
|
+
body?: string;
|
|
8
|
+
contentType?: string;
|
|
9
|
+
}
|
|
10
|
+
interface BuildResultOptions {
|
|
11
|
+
readiness: string;
|
|
12
|
+
options: LoadStrikeAutopilotOptions;
|
|
13
|
+
endpoints: LoadStrikeAutopilotEndpoint[];
|
|
14
|
+
trackingSuggestions: LoadStrikeAutopilotTrackingSelectorSuggestion[];
|
|
15
|
+
thresholdSuggestions: LoadStrikeAutopilotThresholdSuggestion[];
|
|
16
|
+
redactions: LoadStrikeAutopilotRedaction[];
|
|
17
|
+
warnings: string[];
|
|
18
|
+
readinessFailures: LoadStrikeAutopilotReadinessFailure[];
|
|
19
|
+
httpRequest?: AutopilotHttpRequest;
|
|
20
|
+
observedLatencyMs?: number;
|
|
21
|
+
confidence: number;
|
|
22
|
+
}
|
|
23
|
+
export declare class LoadStrikeAutopilotResult implements LoadStrikeAutopilotResultShape {
|
|
24
|
+
#private;
|
|
25
|
+
readonly Readiness: string;
|
|
26
|
+
readonly Plan: LoadStrikeAutopilotPlan;
|
|
27
|
+
readonly Endpoints: LoadStrikeAutopilotEndpoint[];
|
|
28
|
+
readonly Redactions: LoadStrikeAutopilotRedaction[];
|
|
29
|
+
readonly Warnings: string[];
|
|
30
|
+
readonly ReadinessFailures: LoadStrikeAutopilotReadinessFailure[];
|
|
31
|
+
PreviewReport?: LoadStrikeAutopilotPreviewReport;
|
|
32
|
+
readonly ObservedLatencyMs?: number;
|
|
33
|
+
constructor(values: Omit<BuildResultOptions, "options" | "confidence" | "trackingSuggestions" | "thresholdSuggestions"> & {
|
|
34
|
+
plan: LoadStrikeAutopilotPlan;
|
|
35
|
+
});
|
|
36
|
+
buildScenario(): LoadStrikeScenario;
|
|
37
|
+
BuildScenario(): LoadStrikeScenario;
|
|
38
|
+
}
|
|
39
|
+
export declare class LoadStrikeAutopilot {
|
|
40
|
+
static generate(request: LoadStrikeAutopilotRequest): LoadStrikeAutopilotResult;
|
|
41
|
+
static Generate(request: LoadStrikeAutopilotRequest): LoadStrikeAutopilotResult;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export type { LoadStrikeDateValue, LoadStrikeObject, LoadStrikeRunContext as LoadStrikeContractRunContext, LoadStrikeScenarioSpec, LoadStrikeLoadSimulationSpec, LoadStrikeThresholdSpec, LoadStrikeTrackingConfigurationSpec, LoadStrikeCorrelationStoreSpec, LoadStrikeRedisCorrelationStoreSpec, LoadStrikeEndpointSpec, LoadStrikeHttpEndpointOptions, LoadStrikeHttpAuthOptions, LoadStrikeHttpOAuth2ClientCredentialsOptions, LoadStrikeKafkaEndpointOptions, LoadStrikeKafkaSaslOptions, LoadStrikeRabbitMqEndpointOptions, LoadStrikeNatsEndpointOptions, LoadStrikeRedisStreamsEndpointOptions, LoadStrikeAzureEventHubsEndpointOptions, LoadStrikeDelegateEndpointOptions, LoadStrikePushDiffusionEndpointOptions, LoadStrikeReportingSinkSpec, LoadStrikeInfluxDbSinkOptions, LoadStrikeTimescaleDbSinkOptions, LoadStrikeGrafanaLokiSinkOptions, LoadStrikeDatadogSinkOptions, LoadStrikeSplunkSinkOptions, LoadStrikeOtelCollectorSinkOptions, LoadStrikeWorkerPluginSpec, LoadStrikeRunRequest, LoadStrikeRunResponse, LoadStrikeNodeStatsDto, LoadStrikeNodeInfoDto, LoadStrikeTestInfoDto, LoadStrikeScenarioStatsDto, LoadStrikeStepStatsDto, LoadStrikeMeasurementStatsDto, LoadStrikeRequestStatsDto, LoadStrikeLatencyStatsDto, LoadStrikeDataTransferStatsDto, LoadStrikeStatusCodeStatsDto, LoadStrikeMetricStatsDto, LoadStrikeCounterStatsDto, LoadStrikeGaugeStatsDto, LoadStrikeThresholdResultDto, LoadStrikePluginDataDto, LoadStrikePluginDataTableDto, LoadStrikePayloadDto, LoadStrikeProducedMessageRequestDto, LoadStrikeProducedMessageResultDto, LoadStrikeConsumedMessageDto } from "./contracts.js";
|
|
2
|
+
export { LoadStrikeAutopilot, LoadStrikeAutopilotResult } from "./autopilot.js";
|
|
3
|
+
export type { LoadStrikeAutopilotEndpoint, LoadStrikeAutopilotEndpointBinding, LoadStrikeAutopilotLoadSimulationSuggestion, LoadStrikeAutopilotMessageSample, LoadStrikeAutopilotOptions, LoadStrikeAutopilotPlan, LoadStrikeAutopilotPreviewReport, LoadStrikeAutopilotReadinessFailure, LoadStrikeAutopilotRedaction, LoadStrikeAutopilotRequest, LoadStrikeAutopilotResultShape, LoadStrikeAutopilotScenarioPlan, LoadStrikeAutopilotSecretBinding, LoadStrikeAutopilotThresholdSuggestion, LoadStrikeAutopilotTrackingSelectorSuggestion } from "./autopilot-contracts.js";
|
|
4
|
+
export { LoadStrikeAutopilotReadiness } from "./autopilot-contracts.js";
|
|
2
5
|
export { CrossPlatformScenarioConfigurator, ScenarioTrackingExtensions, LoadStrikeContext, LoadStrikePluginData, LoadStrikePluginDataTable, LoadStrikeNodeType, LoadStrikeReportFormat, LoadStrikeResponse, LoadStrikeLogLevel, LoadStrikeScenarioOperation, LoadStrikeOperationType, LoadStrikeRunner, LoadStrikeScenario, LoadStrikeSimulation, LoadStrikeMetric, LoadStrikeCounter, LoadStrikeGauge, LoadStrikeStep, LoadStrikeThreshold } from "./runtime.js";
|
|
3
6
|
export type { ILoadStrikeReportingSink, ILoadStrikeWorkerPlugin, LoadStrikeRunResult, LoadStrikeReportingSink, LoadStrikeRuntimePolicy, LoadStrikeRunnerOptions, LoadStrikeRunContext as LoadStrikeRuntimeContext, LoadStrikeRunContext, LoadStrikeBaseContext, LoadStrikeCounterStats, LoadStrikeDataTransferStats, LoadStrikeGaugeStats, LoadStrikeLogger, LoadStrikeLoadSimulationStats, LoadStrikeMeasurementStats, LoadStrikeMetricStats, LoadStrikeNodeInfo, LoadStrikeMetricValue, LoadStrikeRandom, LoadStrikeReply, LoadStrikeLatencyCount, LoadStrikeLatencyStats, LoadStrikeLoadSimulation, LoadStrikeScenarioInfo, LoadStrikeScenarioInitContext, LoadStrikeScenarioPartition, LoadStrikeScenarioStartInfo, LoadStrikeScenarioContext, LoadStrikeScenarioStats, LoadStrikeTestInfo, LoadStrikeScenarioRuntime, LoadStrikeSessionStartInfo, LoadStrikeSinkSession, LoadStrikeSinkError, LoadStrikeStatusCodeStats, LoadStrikeThresholdResult, LoadStrikeThresholdPredicateContext, CrossPlatformTrackingConfiguration, LoadStrikeStepReply, LoadStrikeStepStats, LoadStrikeStepRuntime, LoadStrikeThresholdOptions, LoadStrikeRequestStats, LoadStrikeWorkerPlugin } from "./runtime.js";
|
|
4
7
|
export { CorrelationStoreConfiguration, CrossPlatformTrackingRuntime, InMemoryCorrelationStore, RedisCorrelationStoreOptions, RedisCorrelationStore, TrackingPayloadBuilder, TrackingFieldSelector } from "./correlation.js";
|
package/dist/types/runtime.d.ts
CHANGED
|
@@ -1476,6 +1476,7 @@ export declare class LoadStrikeScenario {
|
|
|
1476
1476
|
private readonly warmUpDurationSeconds;
|
|
1477
1477
|
private readonly weight;
|
|
1478
1478
|
private readonly restartIterationOnFail;
|
|
1479
|
+
private readonly internalLicenseFeatures;
|
|
1479
1480
|
private constructor();
|
|
1480
1481
|
static create(name: string, runHandler: (context: LoadStrikeScenarioContext) => Promise<LoadStrikeStepReply> | LoadStrikeStepReply): LoadStrikeScenario;
|
|
1481
1482
|
static Create(name: string, runHandler: (context: LoadStrikeScenarioContext) => Promise<LoadStrikeStepReply> | LoadStrikeStepReply): LoadStrikeScenario;
|
|
@@ -1592,6 +1593,8 @@ export declare class LoadStrikeScenario {
|
|
|
1592
1593
|
* Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
|
|
1593
1594
|
*/
|
|
1594
1595
|
shouldRestartIterationOnFail(): boolean;
|
|
1596
|
+
__loadStrikeInternalLicenseFeatures(): string[];
|
|
1597
|
+
__loadStrikeWithInternalLicenseFeatures(...features: string[]): LoadStrikeScenario;
|
|
1595
1598
|
invokeInit(context: LoadStrikeScenarioInitContext): Promise<void>;
|
|
1596
1599
|
invokeClean(context: LoadStrikeScenarioInitContext): Promise<void>;
|
|
1597
1600
|
execute(context: LoadStrikeScenarioContext): Promise<LoadStrikeStepReply>;
|
package/package.json
CHANGED