Skip to content

Commit

Permalink
set avg duration to 0 if smaller than 0.1s
Browse files Browse the repository at this point in the history
  • Loading branch information
ayasayadi1 committed Apr 30, 2024
1 parent 10ac837 commit 19e7a62
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
for (var i = 0; i < chartData.length; i++) {
graphData[0].push(chartData[i].c ? chartData[i].c : 0);
graphData[1].push(chartData[i].s ? chartData[i].s : 0);
graphData[2].push(chartData[i].dur ? chartData[i].dur / (chartData[i].c || 1) : 0);
let avgDur = (chartData[i].dur || 0) / (chartData[i].c || 1);
graphData[2].push(avgDur < 0.1 ? 0 : avgDur);
if (chartData[i].c) {
count += chartData[i].c;
}
Expand Down

0 comments on commit 19e7a62

Please sign in to comment.