Commit 00eaeb3f authored by Xida Chen's avatar Xida Chen Committed by Commit Bot

[cc/metrics] Delete some dead code

With this CL:
https://chromium-review.googlesource.com/c/chromium/src/+/2234063

We changed how the aggregated throughput is computed, but I forgot
to delete the old old which is the ComputeAggregatedThroughput().

This CL deletes the dead code. This is a code health CL, no
behavior change.

Change-Id: I946e215f10270827065b667893c8782a9482f30a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2285932Reviewed-by: default avatarweiliangc <weiliangc@chromium.org>
Commit-Queue: Xida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786431}
parent 2c0232ca
......@@ -194,17 +194,6 @@ void FrameSequenceMetrics::AdvanceTrace(base::TimeTicks timestamp) {
trace_data_.Advance(timestamp);
}
void FrameSequenceMetrics::ComputeAggregatedThroughput() {
// Whenever we are expecting and producing main frames, we are expecting and
// producing impl frames as well. As an example, if we expect one main frame
// to be produced, and when that main frame is presented, we are expecting 3
// impl frames, then the number of expected frames is 3 for the aggregated
// throughput.
aggregated_throughput_.frames_expected = impl_throughput_.frames_expected;
DCHECK_LE(aggregated_throughput_.frames_produced,
aggregated_throughput_.frames_expected);
}
void FrameSequenceMetrics::ReportMetrics() {
DCHECK_LE(impl_throughput_.frames_produced, impl_throughput_.frames_expected);
DCHECK_LE(main_throughput_.frames_produced, main_throughput_.frames_expected);
......
......@@ -106,9 +106,6 @@ class CC_EXPORT FrameSequenceMetrics {
bool HasDataLeftForReporting() const;
// Report related metrics: throughput, checkboarding...
void ReportMetrics();
void ComputeAggregatedThroughputForTesting() {
ComputeAggregatedThroughput();
}
ThroughputData& impl_throughput() { return impl_throughput_; }
ThroughputData& main_throughput() { return main_throughput_; }
......@@ -127,8 +124,6 @@ class CC_EXPORT FrameSequenceMetrics {
void AdvanceTrace(base::TimeTicks timestamp);
private:
void ComputeAggregatedThroughput();
const FrameSequenceTrackerType type_;
// Tracks some data to generate useful trace events.
......
......@@ -14,18 +14,6 @@
namespace cc {
TEST(FrameSequenceMetricsTest, AggregatedThroughput) {
FrameSequenceMetrics first(FrameSequenceTrackerType::kTouchScroll, nullptr);
first.impl_throughput().frames_expected = 200u;
first.impl_throughput().frames_produced = 190u;
first.main_throughput().frames_expected = 100u;
first.main_throughput().frames_produced = 50u;
// The aggregated throughput is computed at ReportMetrics().
first.ComputeAggregatedThroughputForTesting();
EXPECT_EQ(first.aggregated_throughput().frames_expected, 200u);
}
TEST(FrameSequenceMetricsTest, AggregatedThroughputClearedAfterReport) {
FrameSequenceMetrics first(FrameSequenceTrackerType::kCompositorAnimation,
nullptr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment