refactor(性能测试): 性能测试历史报告直接查询overview

This commit is contained in:
Captain.B 2021-04-19 16:58:19 +08:00 committed by 刘瑞斌
parent fbe690d918
commit 098192bf58
4 changed files with 20 additions and 3 deletions

View File

@ -36,11 +36,12 @@
</el-table-column>
<el-table-column
prop="maxUsers"
label="并发用户数">
:label="$t('report.max_users')">
</el-table-column>
<el-table-column
width="150"
prop="avgResponseTime"
label="响应时间">
:label="$t('report.response_time')">
</el-table-column>
<el-table-column
prop="tps"
@ -188,6 +189,16 @@ export default {
this.total = data.itemCount;
this.tableData = data.listObject;
this.selectRows = new Set();
this.tableData.forEach(report => {
if (!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);
});
}
});
});
},
search(combine) {

View File

@ -460,6 +460,8 @@ export default {
not_exist: "Test report does not exist",
batch_delete: "Delete reports in bulk",
delete_batch_confirm: 'Confirm batch delete report',
response_time: 'Response Time(s)',
max_users: 'VUs'
},
load_test: {
completed_test_report: 'Completed test report',

View File

@ -467,6 +467,8 @@ export default {
not_exist: "测试报告不存在",
batch_delete: "批量删除报告",
delete_batch_confirm: '确认批量删除报告',
response_time: '响应时间(s)',
max_users: '并发数'
},
load_test: {
completed_test_report: '已完成测试报告',
@ -501,7 +503,7 @@ export default {
delete_file_confirm: '确认删除文件: ',
file_size_limit: "文件个数超出限制!",
delete_file: "文件已存在,请先删除同名文件!",
thread_num: '并发用户数',
thread_num: '并发用户数',
input_thread_num: '请输入线程数',
duration: '压测时长',
granularity: '聚合时间(秒)',

View File

@ -458,6 +458,8 @@ export default {
not_exist: "測試報告不存在",
batch_delete: "批量刪除報告",
delete_batch_confirm: '確認批量刪除報告',
response_time: '響應時間(s)',
max_users: '並發数'
},
load_test: {
completed_test_report: '已完成的測試報告',