-
-
-
-
-
-
-
-
-
+
diff --git a/frontend/src/business/components/api/test/ApiTestList.vue b/frontend/src/business/components/api/test/ApiTestList.vue
index 35785fddbc..941b67b0aa 100644
--- a/frontend/src/business/components/api/test/ApiTestList.vue
+++ b/frontend/src/business/components/api/test/ApiTestList.vue
@@ -7,7 +7,7 @@
:title="$t('commons.test')"
@create="create" :createTip="$t('load_test.create')" :runTip="$t('load_test.run')"
:show-run="true"
- @runTest="runTest"/>
+ @runTest="runTest" @historicalDataUpgrade="historicalDataUpgrade"/>
@@ -54,7 +54,8 @@
-
+
@@ -72,13 +73,14 @@
import {TEST_CONFIGS} from "../../common/components/search/search-components";
import {ApiEvent, LIST_CHANGE} from "@/business/components/common/head/ListEvent";
import ApiCopyDialog from "./components/ApiCopyDialog";
+ import MsUpgrade from "./Upgrade";
export default {
components: {
ApiCopyDialog,
OneClickOperation,
MsTableOperators,
- MsApiTestStatus, MsMainContainer, MsContainer, MsTableHeader, MsTablePagination, MsTableOperator
+ MsApiTestStatus, MsMainContainer, MsContainer, MsTableHeader, MsTablePagination, MsTableOperator, MsUpgrade
},
data() {
return {
@@ -204,6 +206,13 @@
_filter(filters, this.condition);
this.init();
},
+ historicalDataUpgrade() {
+ if (this.selectIds.size < 1) {
+ this.$warning(this.$t('test_track.plan_view.select_manipulate'));
+ } else {
+ this.$refs.upgrade.openOneClickOperation();
+ }
+ }
},
created() {
this.init();
diff --git a/frontend/src/business/components/api/test/Upgrade.vue b/frontend/src/business/components/api/test/Upgrade.vue
new file mode 100644
index 0000000000..5e0f9c2d92
--- /dev/null
+++ b/frontend/src/business/components/api/test/Upgrade.vue
@@ -0,0 +1,109 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/business/components/common/components/MsTableHeader.vue b/frontend/src/business/components/common/components/MsTableHeader.vue
index 09af2c28de..00c0f9d991 100644
--- a/frontend/src/business/components/common/components/MsTableHeader.vue
+++ b/frontend/src/business/components/common/components/MsTableHeader.vue
@@ -13,6 +13,8 @@
+
@@ -84,6 +86,9 @@
},
runTest() {
this.$emit('runTest')
+ },
+ historicalDataUpgrade() {
+ this.$emit('historicalDataUpgrade');
}
},
computed: {
diff --git a/frontend/src/business/components/performance/report/components/PerformancePressureConfig.vue b/frontend/src/business/components/performance/report/components/PerformancePressureConfig.vue
index 456f61e8d3..ee34766b45 100644
--- a/frontend/src/business/components/performance/report/components/PerformancePressureConfig.vue
+++ b/frontend/src/business/components/performance/report/components/PerformancePressureConfig.vue
@@ -21,45 +21,85 @@
size="mini"/>
-
-
+
+
+ {{ $t('load_test.by_duration') }}
+ {{ $t('load_test.by_iteration') }}
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -83,6 +123,10 @@ const STEPS = "Steps";
const DURATION = "duration";
const RPS_LIMIT = "rpsLimit";
const RPS_LIMIT_ENABLE = "rpsLimitEnable";
+const THREAD_TYPE = "threadType";
+const ITERATE_NUM = "iterateNum";
+const ITERATE_RAMP_UP = "iterateRampUpTime";
+
const hexToRgba = function (hex, opacity) {
return 'rgba(' + parseInt('0x' + hex.slice(1, 3)) + ',' + parseInt('0x' + hex.slice(3, 5)) + ','
+ parseInt('0x' + hex.slice(5, 7)) + ',' + opacity + ')';
@@ -128,6 +172,9 @@ export default {
case RAMP_UP:
this.threadGroups[i].rampUpTime = item.value;
break;
+ case ITERATE_RAMP_UP:
+ this.threadGroups[i].iterateRampUp = item.value;
+ break;
case DURATION:
if (item.unit) {
this.threadGroups[i].duration = item.value;
@@ -144,6 +191,12 @@ export default {
case RPS_LIMIT_ENABLE:
this.threadGroups[i].rpsLimitEnable = item.value;
break;
+ case THREAD_TYPE:
+ this.threadGroups[i].threadType = item.value;
+ break;
+ case ITERATE_NUM:
+ this.threadGroups[i].iterateNum = item.value;
+ break;
default:
break;
}
@@ -157,6 +210,9 @@ export default {
case RAMP_UP:
this.threadGroups[0].rampUpTime = d.value;
break;
+ case ITERATE_RAMP_UP:
+ this.threadGroups[0].iterateRampUp = d.value;
+ break;
case DURATION:
if (d.unit) {
this.threadGroups[0].duration = d.value;
@@ -173,6 +229,12 @@ export default {
case RPS_LIMIT_ENABLE:
this.threadGroups[0].rpsLimitEnable = d.value;
break;
+ case THREAD_TYPE:
+ this.threadGroups[0].threadType = d.value;
+ break;
+ case ITERATE_NUM:
+ this.threadGroups[0].iterateNum = d.value;
+ break;
default:
break;
}
diff --git a/frontend/src/business/components/performance/test/EditPerformanceTest.vue b/frontend/src/business/components/performance/test/EditPerformanceTest.vue
index 2e2769f1a1..8af0e56832 100644
--- a/frontend/src/business/components/performance/test/EditPerformanceTest.vue
+++ b/frontend/src/business/components/performance/test/EditPerformanceTest.vue
@@ -298,6 +298,9 @@ export default {
tg.rampUpTime = tg.rampUpTime || 5;
tg.step = tg.step || 5;
tg.rpsLimit = tg.rpsLimit || 10;
+ tg.threadType = tg.threadType || 'DURATION';
+ tg.iterateNum = tg.iterateNum || 1;
+ tg.iterateRampUp = tg.iterateRampUp || 10;
handler.calculateChart(tg);
});
}
diff --git a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue
index c531212baa..88098c33af 100644
--- a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue
+++ b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue
@@ -33,45 +33,83 @@
size="mini"/>
-
-
+
+
+ {{ $t('load_test.by_duration') }}
+ {{ $t('load_test.by_iteration') }}
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -91,11 +129,14 @@ import {findTestPlan, findThreadGroup} from "@/business/components/performance/t
const TARGET_LEVEL = "TargetLevel";
const RAMP_UP = "RampUp";
+const ITERATE_RAMP_UP = "iterateRampUpTime";
const STEPS = "Steps";
const DURATION = "duration";
const RPS_LIMIT = "rpsLimit";
const RPS_LIMIT_ENABLE = "rpsLimitEnable";
const HOLD = "Hold";
+const THREAD_TYPE = "threadType";
+const ITERATE_NUM = "iterateNum";
const hexToRgba = function (hex, opacity) {
return 'rgba(' + parseInt('0x' + hex.slice(1, 3)) + ',' + parseInt('0x' + hex.slice(3, 5)) + ','
@@ -186,6 +227,9 @@ export default {
case RAMP_UP:
this.threadGroups[i].rampUpTime = item.value;
break;
+ case ITERATE_RAMP_UP:
+ this.threadGroups[i].iterateRampUp = item.value;
+ break;
case DURATION:
if (item.unit) {
this.threadGroups[i].duration = item.value;
@@ -202,9 +246,19 @@ export default {
case RPS_LIMIT_ENABLE:
this.threadGroups[i].rpsLimitEnable = item.value;
break;
+ case THREAD_TYPE:
+ this.threadGroups[i].threadType = item.value;
+ break;
+ case ITERATE_NUM:
+ this.threadGroups[i].iterateNum = item.value;
+ break;
default:
break;
}
+ //
+ this.$set(this.threadGroups[i], "threadType", this.threadGroups[i].threadType || 'DURATION');
+ this.$set(this.threadGroups[i], "iterateNum", this.threadGroups[i].iterateNum || 1);
+ this.$set(this.threadGroups[i], "iterateRampUp", this.threadGroups[i].iterateRampUp || 10);
})
this.calculateChart(this.threadGroups[i]);
} else {
@@ -215,6 +269,9 @@ export default {
case RAMP_UP:
this.threadGroups[0].rampUpTime = d.value;
break;
+ case ITERATE_RAMP_UP:
+ this.threadGroups[0].iterateRampUp = d.value;
+ break;
case DURATION:
if (d.unit) {
this.threadGroups[0].duration = d.value;
@@ -231,9 +288,18 @@ export default {
case RPS_LIMIT_ENABLE:
this.threadGroups[0].rpsLimitEnable = d.value;
break;
+ case THREAD_TYPE:
+ this.threadGroups[0].threadType = d.value;
+ break;
+ case ITERATE_NUM:
+ this.threadGroups[0].iterateNum = d.value;
+ break;
default:
break;
}
+ this.$set(this.threadGroups[0], "threadType", this.threadGroups[0].threadType || 'DURATION');
+ this.$set(this.threadGroups[0], "iterateNum", this.threadGroups[0].iterateNum || 1);
+ this.$set(this.threadGroups[0], "iterateRampUp", this.threadGroups[0].iterateRampUp || 10);
this.calculateChart(this.threadGroups[0]);
}
}
@@ -461,7 +527,7 @@ export default {
for (let i = 0; i < this.threadGroups.length; i++) {
if (!this.threadGroups[i].threadNumber || !this.threadGroups[i].duration
- || !this.threadGroups[i].rampUpTime || !this.threadGroups[i].step) {
+ || !this.threadGroups[i].rampUpTime || !this.threadGroups[i].step || !this.threadGroups[i].iterateNum) {
this.$warning(this.$t('load_test.pressure_config_params_is_empty'));
this.$emit('changeActive', '1');
return false;
@@ -488,6 +554,9 @@ export default {
{key: RPS_LIMIT, value: this.threadGroups[i].rpsLimit},
{key: RPS_LIMIT_ENABLE, value: this.threadGroups[i].rpsLimitEnable},
{key: HOLD, value: this.threadGroups[i].duration - this.threadGroups[i].rampUpTime},
+ {key: THREAD_TYPE, value: this.threadGroups[i].threadType},
+ {key: ITERATE_NUM, value: this.threadGroups[i].iterateNum},
+ {key: ITERATE_RAMP_UP, value: this.threadGroups[i].iterateRampUp},
]);
}
return result;
diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack
index 010ad7a5f0..7d43154a7c 160000
--- a/frontend/src/business/components/xpack
+++ b/frontend/src/business/components/xpack
@@ -1 +1 @@
-Subproject commit 010ad7a5f072a5e9d368c756a2473bbd20781433
+Subproject commit 7d43154a7c19732407a8e9ace8a7d1ea13c91f36
diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js
index 61611f4450..2891207808 100644
--- a/frontend/src/i18n/en-US.js
+++ b/frontend/src/i18n/en-US.js
@@ -438,6 +438,10 @@ export default {
input_rps_limit: 'Please enter a limit',
ramp_up_time_within: 'In',
ramp_up_time_minutes: 'seconds, separate',
+ ramp_up_time_seconds: 'seconds add concurrent users',
+ iterate_num: 'Iterations: ',
+ by_iteration: 'By iterations',
+ by_duration: 'By duration',
ramp_up_time_times: 'add concurrent users',
advanced_config_error: 'Advanced configuration verification failed',
domain_bind: 'Domain bind',
diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js
index 4e935f35b5..944fe712f7 100644
--- a/frontend/src/i18n/zh-CN.js
+++ b/frontend/src/i18n/zh-CN.js
@@ -434,6 +434,10 @@ export default {
input_rps_limit: '请输入限制',
ramp_up_time_within: '在',
ramp_up_time_minutes: '秒内,分',
+ ramp_up_time_seconds: '秒内增加并发用户',
+ iterate_num: '迭代次数 (次): ',
+ by_iteration: '按迭代次数',
+ by_duration: '按持续时间',
ramp_up_time_times: '次增加并发用户',
advanced_config_error: '高级配置校验失败',
domain_bind: '域名绑定',
diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js
index 11fddfe1e5..5ba7888a5f 100644
--- a/frontend/src/i18n/zh-TW.js
+++ b/frontend/src/i18n/zh-TW.js
@@ -434,6 +434,10 @@ export default {
input_rps_limit: '請輸入限制',
ramp_up_time_within: '在',
ramp_up_time_minutes: '秒內,分',
+ ramp_up_time_seconds: '秒內增加並發用戶',
+ iterate_num: '迭代次數 (次): ',
+ by_iteration: '按迭代次數',
+ by_duration: '按壓測時長',
ramp_up_time_times: '次增加並發用戶',
advanced_config_error: '高級配置校驗失敗',
domain_bind: '域名綁定',