Use statically sized arrays for LocalFrameUkmAggregator metrics
The size of: |LocalFrameUkmAggregator::absolute_metric_records_|, |LocalFrameUkmAggregator::SampleToRecord::sub_metrics_durations| and |LocalFrameUkmAggregator::SampleToRecord::sub_main_frame_durations| should match the number of sub-metrics (kCount). These are Vectors that are sized in the constructor, but they could as well be statically sized arrays, which makes working with them a tad bit more efficient. Try to eliminate iteration using kCount, and use the size of the metric data instead. Also change LocalFrameUkmAggregator::AllMetricsAreZero to use TimeDelta::is_zero(). Change-Id: Ia423e022de80328cc8f1847086f6988bf73203f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2270207Reviewed-by:Stephen Chenney <schenney@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#844081}
Showing
Please register or sign in to comment