refactor(性能测试): 修改性能测试报告页面 (#5730)

Co-authored-by: Captain.B <bin@fit2cloud.com>
This commit is contained in:
metersphere-bot 2021-08-26 11:47:14 +08:00 committed by GitHub
parent 25c2a85a52
commit f9770d7096
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 15 deletions

View File

@ -197,6 +197,9 @@ export default {
}
},
handleGetTop5(data) {
if (!data) {
return;
}
this.errorTop1 = data.map(e => {
return {error1: e.error1, error1Size: e.error1Size};
});

View File

@ -82,11 +82,13 @@ import {
getPerformanceReportErrorChart,
getPerformanceReportLoadChart,
getPerformanceReportOverview,
getPerformanceReportResChart, getPerformanceReportResponseCodeChart,
getPerformanceReportResChart,
getPerformanceReportResponseCodeChart,
getSharePerformanceReportErrorChart,
getSharePerformanceReportLoadChart,
getSharePerformanceReportOverview,
getSharePerformanceReportResChart, getSharePerformanceReportResponseCodeChart,
getSharePerformanceReportResChart,
getSharePerformanceReportResponseCodeChart,
} from "@/network/load-test";
const color = ['#60acfc', '#32d3eb', '#5bc49f', '#feb64d', '#ff7c7c', '#9287e7', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'];
@ -140,10 +142,10 @@ export default {
},
initData() {
this.buildInfo();
this.loadOption = {};
this.resOption = {};
this.errorOption = {};
this.resCodeOption = {};
// this.loadOption = {};
// this.resOption = {};
// this.errorOption = {};
// this.resCodeOption = {};
},
buildInfo(data) {
this.maxUsers = data ? data.maxUsers : '0';
@ -169,6 +171,9 @@ export default {
}
},
handleGetLoadChart(data) {
if (!data) {
return;
}
let loadOption = {
color: color,
title: {
@ -229,7 +234,7 @@ export default {
max: yAxis2ListMax,
interval: yAxis2ListMax / 5
}
]
];
this.loadOption = this.generateOption(loadOption, allData);
},
getResChart() {
@ -247,6 +252,9 @@ export default {
}
},
handleGetResChart(data) {
if (!data) {
return;
}
let resOption = {
color: color,
title: {
@ -327,6 +335,9 @@ export default {
}
},
handleGetErrorChart(data) {
if (!data) {
return;
}
let errorOption = {
color: color,
title: {
@ -387,7 +398,7 @@ export default {
max: yAxisListMax,
interval: yAxisListMax / 5
}
]
];
this.errorOption = this.generateOption(errorOption, allData);
},
@ -406,6 +417,9 @@ export default {
}
},
handleGetResponseCodeChart(data) {
if (!data) {
return;
}
let resCodeOption = {
color: color,
title: {