@grafana/k6-test-builder 0.8.17 → 0.8.20
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 +8 -8
- package/dist/index.js +36 -10
- package/dist/module.js +36 -10
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,20 +3,20 @@ import { InvalidArchiveError } from "har-to-k6";
|
|
|
3
3
|
import { ThemeOptions } from "@material-ui/core/styles/createTheme";
|
|
4
4
|
import { GrafanaTheme2 } from "@grafana/data";
|
|
5
5
|
interface VUhBreakdown {
|
|
6
|
-
base_total_vuh: number;
|
|
7
|
-
protocol_vuh: number;
|
|
8
|
-
browser_vuh: number;
|
|
6
|
+
base_total_vuh: number | null;
|
|
7
|
+
protocol_vuh: number | null;
|
|
8
|
+
browser_vuh: number | null;
|
|
9
9
|
reduction_rate: number | null;
|
|
10
10
|
reduction_rate_breakdown: {
|
|
11
|
-
volume: number;
|
|
12
|
-
local_run: number;
|
|
11
|
+
volume: number | null;
|
|
12
|
+
local_run: number | null;
|
|
13
13
|
} | null;
|
|
14
14
|
}
|
|
15
15
|
interface VuhStats {
|
|
16
|
-
vuh_usage: number |
|
|
16
|
+
vuh_usage: number | null;
|
|
17
17
|
vuh_breakdown: VUhBreakdown;
|
|
18
18
|
}
|
|
19
|
-
interface
|
|
19
|
+
export interface TestBuilderMetadata {
|
|
20
20
|
vuh: VuhStats;
|
|
21
21
|
}
|
|
22
22
|
type LoadZoneDistribution = 'even' | 'manual';
|
|
@@ -381,7 +381,7 @@ interface TestBuilderStandaloneProps {
|
|
|
381
381
|
loading?: boolean;
|
|
382
382
|
saving?: boolean;
|
|
383
383
|
k6Test?: TestBuilderTest;
|
|
384
|
-
metadata?:
|
|
384
|
+
metadata?: TestBuilderMetadata;
|
|
385
385
|
hasCloudExecution?: boolean;
|
|
386
386
|
/** @deprecated To be replaced by adaptive VUhs */
|
|
387
387
|
hasFractionalVUhResolution?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -15672,6 +15672,7 @@ const $7091d48bbccc61e3$export$42a852a2b6b56249 = /*#__PURE__*/ (0, ($parcel$int
|
|
|
15672
15672
|
|
|
15673
15673
|
|
|
15674
15674
|
|
|
15675
|
+
|
|
15675
15676
|
const $723b70ee4d7f62e8$export$1ae172e61ce3735b = /*#__PURE__*/ (0, $gkIgo$react.forwardRef)(({ props: props }, ref)=>/*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)("svg", {
|
|
15676
15677
|
ref: ref,
|
|
15677
15678
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -15693,12 +15694,12 @@ const $723b70ee4d7f62e8$export$1ae172e61ce3735b = /*#__PURE__*/ (0, $gkIgo$react
|
|
|
15693
15694
|
|
|
15694
15695
|
const $4e99116d1d1b712a$var$VUH_THRESHOLD = 100;
|
|
15695
15696
|
const $4e99116d1d1b712a$export$f4f5234705b8ee7d = ({ vuh_breakdown: vuh_breakdown, vuh_usage: vuh_usage = 0 })=>{
|
|
15696
|
-
const { base_total_vuh: base_total_vuh = 0, reduction_rate: reduction_rate = 0 } = vuh_breakdown;
|
|
15697
|
+
const { base_total_vuh: base_total_vuh = 0, reduction_rate: reduction_rate = 0 } = vuh_breakdown !== null && vuh_breakdown !== void 0 ? vuh_breakdown : {};
|
|
15697
15698
|
const original = (0, $4bac6ee95b8c8b72$export$24567f54a9be5ab9)(base_total_vuh);
|
|
15698
15699
|
const reduced = (0, $4bac6ee95b8c8b72$export$24567f54a9be5ab9)(vuh_usage);
|
|
15699
15700
|
const percentage = reduction_rate !== null && reduction_rate !== void 0 ? reduction_rate : 0;
|
|
15700
|
-
const costText = $4e99116d1d1b712a$export$f1b66467ef7e1dfd(
|
|
15701
|
-
const reductionText = $4e99116d1d1b712a$export$753b48ee12fd002c(
|
|
15701
|
+
const costText = $4e99116d1d1b712a$export$f1b66467ef7e1dfd(reduced);
|
|
15702
|
+
const reductionText = $4e99116d1d1b712a$export$753b48ee12fd002c(original, percentage);
|
|
15702
15703
|
return /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)($4e99116d1d1b712a$var$Container, {
|
|
15703
15704
|
children: [
|
|
15704
15705
|
/*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)("span", {
|
|
@@ -15718,7 +15719,7 @@ const $4e99116d1d1b712a$export$f1b66467ef7e1dfd = (value)=>{
|
|
|
15718
15719
|
return `Your test is estimated to consume ${value} Virtual User Hours (VUh)`;
|
|
15719
15720
|
};
|
|
15720
15721
|
const $4e99116d1d1b712a$export$753b48ee12fd002c = (value = 0, percentage = 0)=>{
|
|
15721
|
-
return percentage > 0 ? `,
|
|
15722
|
+
return percentage > 0 ? `, after a volume reduction from the original ${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
15723
|
};
|
|
15723
15724
|
const $4e99116d1d1b712a$var$Container = /*#__PURE__*/ (0, ($parcel$interopDefault($gkIgo$styledcomponents))).div.withConfig({
|
|
15724
15725
|
displayName: "VUhTooltipContent__Container",
|
|
@@ -15729,10 +15730,24 @@ const $4e99116d1d1b712a$var$Container = /*#__PURE__*/ (0, ($parcel$interopDefaul
|
|
|
15729
15730
|
|
|
15730
15731
|
|
|
15731
15732
|
|
|
15733
|
+
|
|
15734
|
+
const $6a5cd5d240c5dbb0$export$5cae361ad82dce8b = (value)=>{
|
|
15735
|
+
const ref = (0, $gkIgo$react.useRef)();
|
|
15736
|
+
(0, $gkIgo$react.useEffect)(()=>{
|
|
15737
|
+
ref.current = value;
|
|
15738
|
+
}, [
|
|
15739
|
+
value
|
|
15740
|
+
]);
|
|
15741
|
+
return ref.current;
|
|
15742
|
+
};
|
|
15743
|
+
|
|
15744
|
+
|
|
15732
15745
|
const $420b9b2911eb0b31$export$692b9323eea6a0ee = ()=>{
|
|
15733
15746
|
const vuh_usage_legacy = (0, $cdee3562a1fa264f$export$9b8881d67105457d)((0, $c5bb589de61e43ba$export$e6bea69880c59e62));
|
|
15734
15747
|
const metadata = (0, $cdee3562a1fa264f$export$9b8881d67105457d)((0, $90b0cfd5919312e7$export$3c947cbaab82b2b8));
|
|
15735
15748
|
const vuh = metadata === null || metadata === void 0 ? void 0 : metadata.vuh;
|
|
15749
|
+
const vuhUsage = vuh === null || vuh === void 0 ? void 0 : vuh.vuh_usage;
|
|
15750
|
+
const prevVUhUsage = (0, $6a5cd5d240c5dbb0$export$5cae361ad82dce8b)(vuhUsage);
|
|
15736
15751
|
if (vuh_usage_legacy && !vuh) return /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)((0, $7091d48bbccc61e3$export$eb2fcfdbd7ba97d4), {
|
|
15737
15752
|
children: [
|
|
15738
15753
|
/*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)((0, $723b70ee4d7f62e8$export$1ae172e61ce3735b), {}),
|
|
@@ -15742,23 +15757,34 @@ const $420b9b2911eb0b31$export$692b9323eea6a0ee = ()=>{
|
|
|
15742
15757
|
"\xa0VUh"
|
|
15743
15758
|
]
|
|
15744
15759
|
});
|
|
15745
|
-
if (!(vuh !== null && vuh !== void 0 && vuh.vuh_usage)) return null;
|
|
15746
15760
|
return /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)((0, $gkIgo$materialuicore.Tooltip), {
|
|
15761
|
+
disableHoverListener: !vuhUsage,
|
|
15747
15762
|
title: /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)((0, $4e99116d1d1b712a$export$f4f5234705b8ee7d), {
|
|
15748
|
-
|
|
15763
|
+
vuh_breakdown: vuh === null || vuh === void 0 ? void 0 : vuh.vuh_breakdown,
|
|
15764
|
+
vuh_usage: vuhUsage
|
|
15749
15765
|
}),
|
|
15750
15766
|
interactive: true,
|
|
15751
15767
|
children: /*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)((0, $7091d48bbccc61e3$export$eb2fcfdbd7ba97d4), {
|
|
15752
15768
|
children: [
|
|
15753
15769
|
/*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsx)((0, $723b70ee4d7f62e8$export$1ae172e61ce3735b), {}),
|
|
15754
|
-
/*#__PURE__*/ (0, $gkIgo$reactjsxruntime.
|
|
15755
|
-
|
|
15756
|
-
|
|
15757
|
-
|
|
15770
|
+
/*#__PURE__*/ (0, $gkIgo$reactjsxruntime.jsxs)($420b9b2911eb0b31$var$VUhContainer, {
|
|
15771
|
+
hasResult: !!vuhUsage,
|
|
15772
|
+
children: [
|
|
15773
|
+
(0, $4bac6ee95b8c8b72$export$24567f54a9be5ab9)(vuhUsage || prevVUhUsage || 0),
|
|
15774
|
+
" VUh"
|
|
15775
|
+
]
|
|
15776
|
+
})
|
|
15758
15777
|
]
|
|
15759
15778
|
})
|
|
15760
15779
|
});
|
|
15761
15780
|
};
|
|
15781
|
+
const $420b9b2911eb0b31$var$VUhContainer = /*#__PURE__*/ (0, ($parcel$interopDefault($gkIgo$styledcomponents))).span.withConfig({
|
|
15782
|
+
displayName: "VUhDetail__VUhContainer",
|
|
15783
|
+
componentId: "sc-zegr8m-0"
|
|
15784
|
+
})([
|
|
15785
|
+
"opacity:",
|
|
15786
|
+
";"
|
|
15787
|
+
], ({ hasResult: hasResult })=>hasResult ? 1 : 0.5);
|
|
15762
15788
|
|
|
15763
15789
|
|
|
15764
15790
|
|
package/dist/module.js
CHANGED
|
@@ -15648,6 +15648,7 @@ const $9d9ef6b1aa606543$export$42a852a2b6b56249 = /*#__PURE__*/ (0, $b7VBt$style
|
|
|
15648
15648
|
|
|
15649
15649
|
|
|
15650
15650
|
|
|
15651
|
+
|
|
15651
15652
|
const $f90e6ac18264291c$export$1ae172e61ce3735b = /*#__PURE__*/ (0, $b7VBt$forwardRef)(({ props: props }, ref)=>/*#__PURE__*/ (0, $b7VBt$jsx)("svg", {
|
|
15652
15653
|
ref: ref,
|
|
15653
15654
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -15669,12 +15670,12 @@ const $f90e6ac18264291c$export$1ae172e61ce3735b = /*#__PURE__*/ (0, $b7VBt$forwa
|
|
|
15669
15670
|
|
|
15670
15671
|
const $7c10312fad43a1ee$var$VUH_THRESHOLD = 100;
|
|
15671
15672
|
const $7c10312fad43a1ee$export$f4f5234705b8ee7d = ({ vuh_breakdown: vuh_breakdown, vuh_usage: vuh_usage = 0 })=>{
|
|
15672
|
-
const { base_total_vuh: base_total_vuh = 0, reduction_rate: reduction_rate = 0 } = vuh_breakdown;
|
|
15673
|
+
const { base_total_vuh: base_total_vuh = 0, reduction_rate: reduction_rate = 0 } = vuh_breakdown !== null && vuh_breakdown !== void 0 ? vuh_breakdown : {};
|
|
15673
15674
|
const original = (0, $f54872b9dc7588c3$export$24567f54a9be5ab9)(base_total_vuh);
|
|
15674
15675
|
const reduced = (0, $f54872b9dc7588c3$export$24567f54a9be5ab9)(vuh_usage);
|
|
15675
15676
|
const percentage = reduction_rate !== null && reduction_rate !== void 0 ? reduction_rate : 0;
|
|
15676
|
-
const costText = $7c10312fad43a1ee$export$f1b66467ef7e1dfd(
|
|
15677
|
-
const reductionText = $7c10312fad43a1ee$export$753b48ee12fd002c(
|
|
15677
|
+
const costText = $7c10312fad43a1ee$export$f1b66467ef7e1dfd(reduced);
|
|
15678
|
+
const reductionText = $7c10312fad43a1ee$export$753b48ee12fd002c(original, percentage);
|
|
15678
15679
|
return /*#__PURE__*/ (0, $b7VBt$jsxs)($7c10312fad43a1ee$var$Container, {
|
|
15679
15680
|
children: [
|
|
15680
15681
|
/*#__PURE__*/ (0, $b7VBt$jsxs)("span", {
|
|
@@ -15694,7 +15695,7 @@ const $7c10312fad43a1ee$export$f1b66467ef7e1dfd = (value)=>{
|
|
|
15694
15695
|
return `Your test is estimated to consume ${value} Virtual User Hours (VUh)`;
|
|
15695
15696
|
};
|
|
15696
15697
|
const $7c10312fad43a1ee$export$753b48ee12fd002c = (value = 0, percentage = 0)=>{
|
|
15697
|
-
return percentage > 0 ? `,
|
|
15698
|
+
return percentage > 0 ? `, after a volume reduction from the original ${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
15699
|
};
|
|
15699
15700
|
const $7c10312fad43a1ee$var$Container = /*#__PURE__*/ (0, $b7VBt$styledcomponents).div.withConfig({
|
|
15700
15701
|
displayName: "VUhTooltipContent__Container",
|
|
@@ -15705,10 +15706,24 @@ const $7c10312fad43a1ee$var$Container = /*#__PURE__*/ (0, $b7VBt$styledcomponent
|
|
|
15705
15706
|
|
|
15706
15707
|
|
|
15707
15708
|
|
|
15709
|
+
|
|
15710
|
+
const $ccb3ba0354cddffc$export$5cae361ad82dce8b = (value)=>{
|
|
15711
|
+
const ref = (0, $b7VBt$useRef)();
|
|
15712
|
+
(0, $b7VBt$useEffect)(()=>{
|
|
15713
|
+
ref.current = value;
|
|
15714
|
+
}, [
|
|
15715
|
+
value
|
|
15716
|
+
]);
|
|
15717
|
+
return ref.current;
|
|
15718
|
+
};
|
|
15719
|
+
|
|
15720
|
+
|
|
15708
15721
|
const $d8f115728c3a4b86$export$692b9323eea6a0ee = ()=>{
|
|
15709
15722
|
const vuh_usage_legacy = (0, $f33bf9327a1ab3ee$export$9b8881d67105457d)((0, $d7b1b7c6f96b1d0a$export$e6bea69880c59e62));
|
|
15710
15723
|
const metadata = (0, $f33bf9327a1ab3ee$export$9b8881d67105457d)((0, $8497e93aef02a037$export$3c947cbaab82b2b8));
|
|
15711
15724
|
const vuh = metadata === null || metadata === void 0 ? void 0 : metadata.vuh;
|
|
15725
|
+
const vuhUsage = vuh === null || vuh === void 0 ? void 0 : vuh.vuh_usage;
|
|
15726
|
+
const prevVUhUsage = (0, $ccb3ba0354cddffc$export$5cae361ad82dce8b)(vuhUsage);
|
|
15712
15727
|
if (vuh_usage_legacy && !vuh) return /*#__PURE__*/ (0, $b7VBt$jsxs)((0, $9d9ef6b1aa606543$export$eb2fcfdbd7ba97d4), {
|
|
15713
15728
|
children: [
|
|
15714
15729
|
/*#__PURE__*/ (0, $b7VBt$jsx)((0, $f90e6ac18264291c$export$1ae172e61ce3735b), {}),
|
|
@@ -15718,23 +15733,34 @@ const $d8f115728c3a4b86$export$692b9323eea6a0ee = ()=>{
|
|
|
15718
15733
|
"\xa0VUh"
|
|
15719
15734
|
]
|
|
15720
15735
|
});
|
|
15721
|
-
if (!(vuh !== null && vuh !== void 0 && vuh.vuh_usage)) return null;
|
|
15722
15736
|
return /*#__PURE__*/ (0, $b7VBt$jsx)((0, $b7VBt$Tooltip), {
|
|
15737
|
+
disableHoverListener: !vuhUsage,
|
|
15723
15738
|
title: /*#__PURE__*/ (0, $b7VBt$jsx)((0, $7c10312fad43a1ee$export$f4f5234705b8ee7d), {
|
|
15724
|
-
|
|
15739
|
+
vuh_breakdown: vuh === null || vuh === void 0 ? void 0 : vuh.vuh_breakdown,
|
|
15740
|
+
vuh_usage: vuhUsage
|
|
15725
15741
|
}),
|
|
15726
15742
|
interactive: true,
|
|
15727
15743
|
children: /*#__PURE__*/ (0, $b7VBt$jsxs)((0, $9d9ef6b1aa606543$export$eb2fcfdbd7ba97d4), {
|
|
15728
15744
|
children: [
|
|
15729
15745
|
/*#__PURE__*/ (0, $b7VBt$jsx)((0, $f90e6ac18264291c$export$1ae172e61ce3735b), {}),
|
|
15730
|
-
/*#__PURE__*/ (0, $b7VBt$
|
|
15731
|
-
|
|
15732
|
-
|
|
15733
|
-
|
|
15746
|
+
/*#__PURE__*/ (0, $b7VBt$jsxs)($d8f115728c3a4b86$var$VUhContainer, {
|
|
15747
|
+
hasResult: !!vuhUsage,
|
|
15748
|
+
children: [
|
|
15749
|
+
(0, $f54872b9dc7588c3$export$24567f54a9be5ab9)(vuhUsage || prevVUhUsage || 0),
|
|
15750
|
+
" VUh"
|
|
15751
|
+
]
|
|
15752
|
+
})
|
|
15734
15753
|
]
|
|
15735
15754
|
})
|
|
15736
15755
|
});
|
|
15737
15756
|
};
|
|
15757
|
+
const $d8f115728c3a4b86$var$VUhContainer = /*#__PURE__*/ (0, $b7VBt$styledcomponents).span.withConfig({
|
|
15758
|
+
displayName: "VUhDetail__VUhContainer",
|
|
15759
|
+
componentId: "sc-zegr8m-0"
|
|
15760
|
+
})([
|
|
15761
|
+
"opacity:",
|
|
15762
|
+
";"
|
|
15763
|
+
], ({ hasResult: hasResult })=>hasResult ? 1 : 0.5);
|
|
15738
15764
|
|
|
15739
15765
|
|
|
15740
15766
|
|