fix(性能测试): 修复场景配置中场景类型和压力配置计算错误的问题

This commit is contained in:
CaptainB 2022-01-10 11:53:17 +08:00 committed by 刘瑞斌
parent 215bd8d791
commit 0784767817
2 changed files with 2 additions and 26 deletions

View File

@ -410,21 +410,7 @@ export default {
if (response.data) { if (response.data) {
let data = JSON.parse(response.data); let data = JSON.parse(response.data);
for (let i = 0; i < this.threadGroups.length; i++) { for (let i = 0; i < this.threadGroups.length; i++) {
let handler = this.threadGroups[i].handler; data[i].forEach(item => {
let j = 0;
for (; j < data.length; j++) {
let res = data[j].filter(v => v.key === HANDLER && v.value === handler);
if (res.length > 0) {
break;
}
}
//
if (this.reportId) {
j = i;
}
data[j].forEach(item => {
switch (item.key) { switch (item.key) {
case TARGET_LEVEL: case TARGET_LEVEL:
this.threadGroups[i].threadNumber = item.value; this.threadGroups[i].threadNumber = item.value;

View File

@ -378,17 +378,7 @@ export default {
let data = JSON.parse(response.data); let data = JSON.parse(response.data);
for (let i = 0; i < this.threadGroups.length; i++) { for (let i = 0; i < this.threadGroups.length; i++) {
let handler = this.threadGroups[i].handler; data[i].forEach(item => {
let j = 0;
for (; j < data.length; j++) {
let res = data[j].filter(v => v.key === HANDLER && v.value === handler);
if (res.length > 0) {
break;
}
}
data[j].forEach(item => {
switch (item.key) { switch (item.key) {
case TARGET_LEVEL: case TARGET_LEVEL:
this.threadGroups[i].threadNumber = item.value; this.threadGroups[i].threadNumber = item.value;