refactor(性能测试): 修改性能测试报告内容字段的数据库存储类型

--bug=1032243 --user=宋天阳 【性能测试】报告-错误记录-所有请求-正确请求-点击查看详情没反应-前端报错
https://www.tapd.cn/55049933/s/1429143
This commit is contained in:
song-tianyang 2023-10-20 16:45:49 +08:00 committed by 建国
parent d054d8156d
commit 9cce9f93fc
4 changed files with 21 additions and 5 deletions

View File

@ -0,0 +1,7 @@
SET SESSION innodb_lock_wait_timeout = 7200;
--
-- 增加一个索引
ALTER TABLE load_test_report_result_realtime
MODIFY COLUMN `report_value` longtext NULL;
SET SESSION innodb_lock_wait_timeout = DEFAULT;

View File

@ -136,7 +136,10 @@ export default {
done();
},
openRecord(row) {
let drawerSamples = this.errorSamples.samples[row.name][row.code];
let drawerSamples = [];
if (this.errorSamples.samples[row.name]) {
drawerSamples = this.errorSamples.samples[row.name][row.code];
}
this.$refs.sampleDrawer.openRecord(drawerSamples);
},
},

View File

@ -56,12 +56,16 @@ export default {
},
openRecord(samples) {
this.sampleRecord = [];
this.$nextTick(() => {
samples.forEach(sample => {
this.sampleRecord.push(sample);
});
if (samples) {
samples.forEach(sample => {
this.sampleRecord.push(sample);
});
}
this.drawer = true;
})
},
},
}

View File

@ -52,7 +52,9 @@ export default {
this.errorSamples.samples[sampleName] = {};
}
this.errorSamples.sampleCount[sampleName][code] = this.samples.sampleCount[sampleName][code] || {};
this.errorSamples.samples[sampleName][code] = this.samples.samples[sampleName][code] || [];
if (this.samples.samples[sampleName]) {
this.errorSamples.samples[sampleName][code] = this.samples.samples[sampleName][code] || [];
}
}
}
}