Skip to content

Commit

Permalink
cc metrics: Do not report throughput UMA for ui compositor.
Browse files Browse the repository at this point in the history
Stop reporting the throughput metrics for the UI compositor, since it is
currently bundled with the throughput metrics for the renderer. We could
report these separately, but it's not clear that these would be used for
monitoring the UI performance.

BUG=1005226

Change-Id: Ia1572010737a66ecba114cfbb96239f822c1ea92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810014
Reviewed-by: Behdad Bakhshinategh <behdadb@chromium.org>
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697747}
  • Loading branch information
sadrulhc authored and Commit Bot committed Sep 18, 2019
1 parent 629090a commit 43dd14a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
6 changes: 5 additions & 1 deletion cc/metrics/frame_sequence_tracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ std::string GetFrameSequenceLengthHistogramName(FrameSequenceTrackerType type) {
// FrameSequenceTrackerCollection

FrameSequenceTrackerCollection::FrameSequenceTrackerCollection(
bool is_single_threaded,
CompositorFrameReportingController* compositor_frame_reporting_controller)
: compositor_frame_reporting_controller_(
: is_single_threaded_(is_single_threaded),
compositor_frame_reporting_controller_(
compositor_frame_reporting_controller) {
StartSequence(FrameSequenceTrackerType::kUniversal);
}
Expand All @@ -80,6 +82,8 @@ FrameSequenceTrackerCollection::~FrameSequenceTrackerCollection() {

void FrameSequenceTrackerCollection::StartSequence(
FrameSequenceTrackerType type) {
if (is_single_threaded_)
return;
if (frame_trackers_.contains(type))
return;
auto tracker = base::WrapUnique(new FrameSequenceTracker(type));
Expand Down
6 changes: 4 additions & 2 deletions cc/metrics/frame_sequence_tracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ enum FrameSequenceTrackerType {
// submitted frames.
class CC_EXPORT FrameSequenceTrackerCollection {
public:
explicit FrameSequenceTrackerCollection(
CompositorFrameReportingController* = nullptr);
FrameSequenceTrackerCollection(
bool is_single_threaded,
CompositorFrameReportingController* frame_reporting_controller);
~FrameSequenceTrackerCollection();

FrameSequenceTrackerCollection(const FrameSequenceTrackerCollection&) =
Expand Down Expand Up @@ -95,6 +96,7 @@ class CC_EXPORT FrameSequenceTrackerCollection {
private:
friend class FrameSequenceTrackerTest;

const bool is_single_threaded_;
// The callsite can use the type to manipulate the tracker.
base::flat_map<FrameSequenceTrackerType,
std::unique_ptr<FrameSequenceTracker>>
Expand Down
3 changes: 2 additions & 1 deletion cc/metrics/frame_sequence_tracker_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class FrameSequenceTrackerTest : public testing::Test {
FrameSequenceTrackerTest()
: compositor_frame_reporting_controller_(
std::make_unique<CompositorFrameReportingController>()),
collection_(compositor_frame_reporting_controller_.get()) {
collection_(/* is_single_threaded=*/false,
compositor_frame_reporting_controller_.get()) {
collection_.StartSequence(FrameSequenceTrackerType::kTouchScroll);
tracker_ = collection_.GetTrackerForTesting(
FrameSequenceTrackerType::kTouchScroll);
Expand Down
3 changes: 2 additions & 1 deletion cc/trees/layer_tree_host_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ LayerTreeHostImpl::LayerTreeHostImpl(
is_animating_for_snap_(false),
paint_image_generator_client_id_(PaintImage::GetNextGeneratorClientId()),
scrollbar_controller_(std::make_unique<ScrollbarController>(this)),
frame_trackers_(compositor_frame_reporting_controller_.get()),
frame_trackers_(settings.single_thread_proxy_scheduler,
compositor_frame_reporting_controller_.get()),
scroll_gesture_did_end_(false) {
DCHECK(mutator_host_);
mutator_host_->SetMutatorHostClient(this);
Expand Down

0 comments on commit 43dd14a

Please sign in to comment.