We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3caf608 commit a44e478Copy full SHA for a44e478
modules/trace/tools/analyzer/main.cpp
@@ -245,8 +245,10 @@ int main(int argc, char **argv)
245
246
//! 处理统计数据
247
for (auto &stat : stat_vec) {
248
- stat.dur_avg_us = stat.dur_acc_us / stat.times;
249
- stat.dur_warn_line_us = (stat.dur_avg_us + stat.dur_max_us) / 2;
+ if (stat.times > 0) {
+ stat.dur_avg_us = stat.dur_acc_us / stat.times;
250
+ stat.dur_warn_line_us = (stat.dur_avg_us + stat.dur_max_us) / 2;
251
+ }
252
}
253
254
//! 第二次遍历记录文件,标出超出警告线的
0 commit comments