@grafana/k6-test-builder 0.8.15 → 0.8.17
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/index.d.ts +1 -1
- package/dist/index.js +20 -14
- package/dist/module.js +20 -14
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -297,7 +297,7 @@ export const DOCS_ARTICLE_LINKS: {
|
|
|
297
297
|
'cloud-apm-new-relic': string;
|
|
298
298
|
'results-visualization/cloud': string;
|
|
299
299
|
'cloud-tests-from-cli.load-zones': string;
|
|
300
|
-
|
|
300
|
+
performanceTestingInvoice: string;
|
|
301
301
|
};
|
|
302
302
|
type DocsArticleLink = keyof typeof DOCS_ARTICLE_LINKS;
|
|
303
303
|
interface ImportItemChoice {
|
package/dist/index.js
CHANGED
|
@@ -216,7 +216,7 @@ const $924f96bd0d5c630d$export$cc0ae9a5c96bcd6f = ()=>/*#__PURE__*/ (0, $gkIgo$r
|
|
|
216
216
|
const $1c4cc247633c6592$var$LOGGER_ENABLE_KEY = '__test_builder_logger_enabled__';
|
|
217
217
|
const $1c4cc247633c6592$var$K6_VERBOSE_LOGS = '_k6_verbose_logs_';
|
|
218
218
|
function $1c4cc247633c6592$var$isEnabled() {
|
|
219
|
-
return
|
|
219
|
+
return process.env.TARGET !== 'prod' || sessionStorage.getItem($1c4cc247633c6592$var$LOGGER_ENABLE_KEY);
|
|
220
220
|
}
|
|
221
221
|
function $1c4cc247633c6592$var$isVerboseEnabled() {
|
|
222
222
|
return !!sessionStorage.getItem($1c4cc247633c6592$var$K6_VERBOSE_LOGS) || !!sessionStorage.getItem($1c4cc247633c6592$var$LOGGER_ENABLE_KEY);
|
|
@@ -813,7 +813,7 @@ const $e96a968658210988$export$9ffca73f9b15ba64 = {
|
|
|
813
813
|
'cloud-apm-new-relic': `${$e96a968658210988$var$K6_DOCS_URL_LEGACY}/docs/cloud/integrations/cloud-apm/new-relic`,
|
|
814
814
|
'results-visualization/cloud': `${$e96a968658210988$var$K6_DOCS_URL_LEGACY}/docs/results-visualization/cloud`,
|
|
815
815
|
'cloud-tests-from-cli.load-zones': '/docs/cloud/creating-and-running-a-test/cloud-scripting-extras/load-zones',
|
|
816
|
-
|
|
816
|
+
performanceTestingInvoice: `${$e96a968658210988$var$GRAFANA_DOCS_URL}/cost-management-and-billing/understand-your-invoice/performance-testing-invoice/`
|
|
817
817
|
};
|
|
818
818
|
const $e96a968658210988$export$7ff6e792a88a203a = 'grpc_reqs';
|
|
819
819
|
const $e96a968658210988$export$4dafb9ce6095cf07 = 'grpc_req_duration';
|
|
@@ -2531,16 +2531,16 @@ function $bd3480c18d26920e$var$_toPrimitive(t, r) {
|
|
|
2531
2531
|
return ("string" === r ? String : Number)(t);
|
|
2532
2532
|
}
|
|
2533
2533
|
class $bd3480c18d26920e$export$4e14bd654b94b4e9 {
|
|
2534
|
-
|
|
2535
|
-
* Decides if this instance is serialized as undefined or not
|
|
2536
|
-
* @private
|
|
2537
|
-
*/ constructor(postData, headers){
|
|
2534
|
+
constructor(postData, headers){
|
|
2538
2535
|
$bd3480c18d26920e$var$_defineProperty(this, "mimeType", 'text/plain');
|
|
2539
2536
|
$bd3480c18d26920e$var$_defineProperty(this, "comment", '');
|
|
2540
2537
|
$bd3480c18d26920e$var$_defineProperty(this, "text", void 0);
|
|
2541
2538
|
$bd3480c18d26920e$var$_defineProperty(this, "params", void 0);
|
|
2542
2539
|
$bd3480c18d26920e$var$_defineProperty(this, "decoded", void 0);
|
|
2543
|
-
|
|
2540
|
+
/**
|
|
2541
|
+
* Decides if this instance is serialized as undefined or not
|
|
2542
|
+
* @private
|
|
2543
|
+
*/ $bd3480c18d26920e$var$_defineProperty(this, "isUndefined", false);
|
|
2544
2544
|
if (!postData || !headers || !postData.type) throw new TypeError('PostDataNode could not be created. Invalid arguments.');
|
|
2545
2545
|
switch(postData.type){
|
|
2546
2546
|
case 'text':
|
|
@@ -4186,11 +4186,11 @@ class $09bbc5e14b02adac$export$3fb97e8df001f5f7 extends SyntaxError {
|
|
|
4186
4186
|
}
|
|
4187
4187
|
}
|
|
4188
4188
|
class $09bbc5e14b02adac$export$dbf96015a8a67c16 {
|
|
4189
|
-
// @ts-ignore
|
|
4190
4189
|
constructor(id, scenarios, loadZones, thresholds, apm = []){
|
|
4191
4190
|
$09bbc5e14b02adac$var$_defineProperty(this, $09bbc5e14b02adac$var$ID, null);
|
|
4192
4191
|
$09bbc5e14b02adac$var$_defineProperty(this, $09bbc5e14b02adac$var$ARCHIVES, []);
|
|
4193
4192
|
$09bbc5e14b02adac$var$_defineProperty(this, $09bbc5e14b02adac$var$SCRIPTS, []);
|
|
4193
|
+
// @ts-ignore
|
|
4194
4194
|
$09bbc5e14b02adac$var$_defineProperty(this, $09bbc5e14b02adac$var$BASE_OPTIONS, void 0);
|
|
4195
4195
|
this.id = id;
|
|
4196
4196
|
this.baseOptions = $09bbc5e14b02adac$export$dbf96015a8a67c16.createLogOptions(loadZones, thresholds, apm);
|
|
@@ -15691,29 +15691,35 @@ const $723b70ee4d7f62e8$export$1ae172e61ce3735b = /*#__PURE__*/ (0, $gkIgo$react
|
|
|
15691
15691
|
|
|
15692
15692
|
|
|
15693
15693
|
|
|
15694
|
+
const $4e99116d1d1b712a$var$VUH_THRESHOLD = 100;
|
|
15694
15695
|
const $4e99116d1d1b712a$export$f4f5234705b8ee7d = ({ vuh_breakdown: vuh_breakdown, vuh_usage: vuh_usage = 0 })=>{
|
|
15695
15696
|
const { base_total_vuh: base_total_vuh = 0, reduction_rate: reduction_rate = 0 } = vuh_breakdown;
|
|
15696
15697
|
const original = (0, $4bac6ee95b8c8b72$export$24567f54a9be5ab9)(base_total_vuh);
|
|
15697
15698
|
const reduced = (0, $4bac6ee95b8c8b72$export$24567f54a9be5ab9)(vuh_usage);
|
|
15698
|
-
const
|
|
15699
|
-
const
|
|
15699
|
+
const percentage = reduction_rate !== null && reduction_rate !== void 0 ? reduction_rate : 0;
|
|
15700
|
+
const costText = $4e99116d1d1b712a$export$f1b66467ef7e1dfd(original);
|
|
15701
|
+
const reductionText = $4e99116d1d1b712a$export$753b48ee12fd002c(reduced, percentage);
|
|
15700
15702
|
return /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)($4e99116d1d1b712a$var$Container, {
|
|
15701
15703
|
children: [
|
|
15702
15704
|
/*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)("span", {
|
|
15703
15705
|
children: [
|
|
15704
|
-
|
|
15705
|
-
original,
|
|
15706
|
-
" Virtual User Hours (VUh)",
|
|
15706
|
+
costText,
|
|
15707
15707
|
reductionText
|
|
15708
15708
|
]
|
|
15709
15709
|
}),
|
|
15710
15710
|
/*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)((0, $cd402c1b3ca4b836$export$e816d7af81d48a79), {
|
|
15711
|
-
article: "
|
|
15711
|
+
article: "performanceTestingInvoice",
|
|
15712
15712
|
children: "Learn more about VUh"
|
|
15713
15713
|
})
|
|
15714
15714
|
]
|
|
15715
15715
|
});
|
|
15716
15716
|
};
|
|
15717
|
+
const $4e99116d1d1b712a$export$f1b66467ef7e1dfd = (value)=>{
|
|
15718
|
+
return `Your test is estimated to consume ${value} Virtual User Hours (VUh)`;
|
|
15719
|
+
};
|
|
15720
|
+
const $4e99116d1d1b712a$export$753b48ee12fd002c = (value = 0, percentage = 0)=>{
|
|
15721
|
+
return percentage > 0 ? `, but you will only be charged for ${value} VUh. Tests consuming more than ${$4e99116d1d1b712a$var$VUH_THRESHOLD} VUh receive volume reductions based on test size.` : `. Tests consuming less than ${$4e99116d1d1b712a$var$VUH_THRESHOLD} Vuh are not eligible for volume reductions.`;
|
|
15722
|
+
};
|
|
15717
15723
|
const $4e99116d1d1b712a$var$Container = /*#__PURE__*/ (0, ($parcel$interopDefault($gkIgo$styledcomponents))).div.withConfig({
|
|
15718
15724
|
displayName: "VUhTooltipContent__Container",
|
|
15719
15725
|
componentId: "sc-1lz5zhl-0"
|
package/dist/module.js
CHANGED
|
@@ -192,7 +192,7 @@ const $a80b21e889559c22$export$cc0ae9a5c96bcd6f = ()=>/*#__PURE__*/ (0, $b7VBt$j
|
|
|
192
192
|
const $77857f570335d7ae$var$LOGGER_ENABLE_KEY = '__test_builder_logger_enabled__';
|
|
193
193
|
const $77857f570335d7ae$var$K6_VERBOSE_LOGS = '_k6_verbose_logs_';
|
|
194
194
|
function $77857f570335d7ae$var$isEnabled() {
|
|
195
|
-
return
|
|
195
|
+
return process.env.TARGET !== 'prod' || sessionStorage.getItem($77857f570335d7ae$var$LOGGER_ENABLE_KEY);
|
|
196
196
|
}
|
|
197
197
|
function $77857f570335d7ae$var$isVerboseEnabled() {
|
|
198
198
|
return !!sessionStorage.getItem($77857f570335d7ae$var$K6_VERBOSE_LOGS) || !!sessionStorage.getItem($77857f570335d7ae$var$LOGGER_ENABLE_KEY);
|
|
@@ -789,7 +789,7 @@ const $977f5f8f585fbb2c$export$9ffca73f9b15ba64 = {
|
|
|
789
789
|
'cloud-apm-new-relic': `${$977f5f8f585fbb2c$var$K6_DOCS_URL_LEGACY}/docs/cloud/integrations/cloud-apm/new-relic`,
|
|
790
790
|
'results-visualization/cloud': `${$977f5f8f585fbb2c$var$K6_DOCS_URL_LEGACY}/docs/results-visualization/cloud`,
|
|
791
791
|
'cloud-tests-from-cli.load-zones': '/docs/cloud/creating-and-running-a-test/cloud-scripting-extras/load-zones',
|
|
792
|
-
|
|
792
|
+
performanceTestingInvoice: `${$977f5f8f585fbb2c$var$GRAFANA_DOCS_URL}/cost-management-and-billing/understand-your-invoice/performance-testing-invoice/`
|
|
793
793
|
};
|
|
794
794
|
const $977f5f8f585fbb2c$export$7ff6e792a88a203a = 'grpc_reqs';
|
|
795
795
|
const $977f5f8f585fbb2c$export$4dafb9ce6095cf07 = 'grpc_req_duration';
|
|
@@ -2507,16 +2507,16 @@ function $f4684ac194011611$var$_toPrimitive(t, r) {
|
|
|
2507
2507
|
return ("string" === r ? String : Number)(t);
|
|
2508
2508
|
}
|
|
2509
2509
|
class $f4684ac194011611$export$4e14bd654b94b4e9 {
|
|
2510
|
-
|
|
2511
|
-
* Decides if this instance is serialized as undefined or not
|
|
2512
|
-
* @private
|
|
2513
|
-
*/ constructor(postData, headers){
|
|
2510
|
+
constructor(postData, headers){
|
|
2514
2511
|
$f4684ac194011611$var$_defineProperty(this, "mimeType", 'text/plain');
|
|
2515
2512
|
$f4684ac194011611$var$_defineProperty(this, "comment", '');
|
|
2516
2513
|
$f4684ac194011611$var$_defineProperty(this, "text", void 0);
|
|
2517
2514
|
$f4684ac194011611$var$_defineProperty(this, "params", void 0);
|
|
2518
2515
|
$f4684ac194011611$var$_defineProperty(this, "decoded", void 0);
|
|
2519
|
-
|
|
2516
|
+
/**
|
|
2517
|
+
* Decides if this instance is serialized as undefined or not
|
|
2518
|
+
* @private
|
|
2519
|
+
*/ $f4684ac194011611$var$_defineProperty(this, "isUndefined", false);
|
|
2520
2520
|
if (!postData || !headers || !postData.type) throw new TypeError('PostDataNode could not be created. Invalid arguments.');
|
|
2521
2521
|
switch(postData.type){
|
|
2522
2522
|
case 'text':
|
|
@@ -4162,11 +4162,11 @@ class $d875af20a6533bde$export$3fb97e8df001f5f7 extends SyntaxError {
|
|
|
4162
4162
|
}
|
|
4163
4163
|
}
|
|
4164
4164
|
class $d875af20a6533bde$export$dbf96015a8a67c16 {
|
|
4165
|
-
// @ts-ignore
|
|
4166
4165
|
constructor(id, scenarios, loadZones, thresholds, apm = []){
|
|
4167
4166
|
$d875af20a6533bde$var$_defineProperty(this, $d875af20a6533bde$var$ID, null);
|
|
4168
4167
|
$d875af20a6533bde$var$_defineProperty(this, $d875af20a6533bde$var$ARCHIVES, []);
|
|
4169
4168
|
$d875af20a6533bde$var$_defineProperty(this, $d875af20a6533bde$var$SCRIPTS, []);
|
|
4169
|
+
// @ts-ignore
|
|
4170
4170
|
$d875af20a6533bde$var$_defineProperty(this, $d875af20a6533bde$var$BASE_OPTIONS, void 0);
|
|
4171
4171
|
this.id = id;
|
|
4172
4172
|
this.baseOptions = $d875af20a6533bde$export$dbf96015a8a67c16.createLogOptions(loadZones, thresholds, apm);
|
|
@@ -15667,29 +15667,35 @@ const $f90e6ac18264291c$export$1ae172e61ce3735b = /*#__PURE__*/ (0, $b7VBt$forwa
|
|
|
15667
15667
|
|
|
15668
15668
|
|
|
15669
15669
|
|
|
15670
|
+
const $7c10312fad43a1ee$var$VUH_THRESHOLD = 100;
|
|
15670
15671
|
const $7c10312fad43a1ee$export$f4f5234705b8ee7d = ({ vuh_breakdown: vuh_breakdown, vuh_usage: vuh_usage = 0 })=>{
|
|
15671
15672
|
const { base_total_vuh: base_total_vuh = 0, reduction_rate: reduction_rate = 0 } = vuh_breakdown;
|
|
15672
15673
|
const original = (0, $f54872b9dc7588c3$export$24567f54a9be5ab9)(base_total_vuh);
|
|
15673
15674
|
const reduced = (0, $f54872b9dc7588c3$export$24567f54a9be5ab9)(vuh_usage);
|
|
15674
|
-
const
|
|
15675
|
-
const
|
|
15675
|
+
const percentage = reduction_rate !== null && reduction_rate !== void 0 ? reduction_rate : 0;
|
|
15676
|
+
const costText = $7c10312fad43a1ee$export$f1b66467ef7e1dfd(original);
|
|
15677
|
+
const reductionText = $7c10312fad43a1ee$export$753b48ee12fd002c(reduced, percentage);
|
|
15676
15678
|
return /*#__PURE__*/ (0, $b7VBt$jsxs)($7c10312fad43a1ee$var$Container, {
|
|
15677
15679
|
children: [
|
|
15678
15680
|
/*#__PURE__*/ (0, $b7VBt$jsxs)("span", {
|
|
15679
15681
|
children: [
|
|
15680
|
-
|
|
15681
|
-
original,
|
|
15682
|
-
" Virtual User Hours (VUh)",
|
|
15682
|
+
costText,
|
|
15683
15683
|
reductionText
|
|
15684
15684
|
]
|
|
15685
15685
|
}),
|
|
15686
15686
|
/*#__PURE__*/ (0, $b7VBt$jsx)((0, $a2bbc3b49e805484$export$e816d7af81d48a79), {
|
|
15687
|
-
article: "
|
|
15687
|
+
article: "performanceTestingInvoice",
|
|
15688
15688
|
children: "Learn more about VUh"
|
|
15689
15689
|
})
|
|
15690
15690
|
]
|
|
15691
15691
|
});
|
|
15692
15692
|
};
|
|
15693
|
+
const $7c10312fad43a1ee$export$f1b66467ef7e1dfd = (value)=>{
|
|
15694
|
+
return `Your test is estimated to consume ${value} Virtual User Hours (VUh)`;
|
|
15695
|
+
};
|
|
15696
|
+
const $7c10312fad43a1ee$export$753b48ee12fd002c = (value = 0, percentage = 0)=>{
|
|
15697
|
+
return percentage > 0 ? `, but you will only be charged for ${value} VUh. Tests consuming more than ${$7c10312fad43a1ee$var$VUH_THRESHOLD} VUh receive volume reductions based on test size.` : `. Tests consuming less than ${$7c10312fad43a1ee$var$VUH_THRESHOLD} Vuh are not eligible for volume reductions.`;
|
|
15698
|
+
};
|
|
15693
15699
|
const $7c10312fad43a1ee$var$Container = /*#__PURE__*/ (0, $b7VBt$styledcomponents).div.withConfig({
|
|
15694
15700
|
displayName: "VUhTooltipContent__Container",
|
|
15695
15701
|
componentId: "sc-1lz5zhl-0"
|