refactor(性能测试): 修改查询overview的方式

This commit is contained in:
Captain.B 2021-05-07 11:42:32 +08:00 committed by 刘瑞斌
parent 25e03d010e
commit 1dcaa8d3b2
1 changed files with 9 additions and 5 deletions

View File

@ -193,11 +193,15 @@ export default {
this.tableData.forEach(report => {
if (report.status === 'Completed' && !report.maxUsers) {
this.result = this.$get('/performance/report/content/testoverview/' + report.id, response => {
this.$set(report, 'maxUsers', response.data.maxUsers);
this.$set(report, 'avgResponseTime', response.data.avgResponseTime);
this.$set(report, 'tps', response.data.avgTransactions);
});
this.result = this.$get('/performance/report/content/testoverview/' + report.id)
.then(response => {
let data = response.data.data;
this.$set(report, 'maxUsers', data.maxUsers);
this.$set(report, 'avgResponseTime', data.avgResponseTime);
this.$set(report, 'tps', data.avgTransactions);
})
.catch(() => {
});
}
});
});