Commit 80c4ae5c authored by Philip Rogers's avatar Philip Rogers Committed by Commit Bot

[CI] Track total Compositing.{Browser,Renderer}.LayersUpdateTime

We current have a histogram for LayersUpdateTime but it is bucketed
by the layer count. This patch adds a new metric for the total
LayersUpdateTime that is not bucketed.

Bug: 825912
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ie9d83f90abf529af97bc2393f8f3ad6dc2e3530d
Reviewed-on: https://chromium-review.googlesource.com/981262Reviewed-by: default avatarMajid Valipour <majidvp@chromium.org>
Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546208}
parent 9ad6ced2
......@@ -18,6 +18,7 @@
#include "base/command_line.h"
#include "base/location.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/numerics/safe_math.h"
#include "base/single_thread_task_runner.h"
......@@ -670,12 +671,16 @@ bool LayerTreeHost::UpdateLayers() {
micro_benchmark_controller_.DidUpdateLayers();
if (const char* client_name = GetClientNameForMetrics()) {
auto elapsed = timer.Elapsed().InMicroseconds();
std::string histogram_name =
base::StringPrintf("Compositing.%s.LayersUpdateTime.%d", client_name,
GetLayersUpdateTimeHistogramBucket(NumLayers()));
base::Histogram::FactoryGet(histogram_name, 0, 10000000, 50,
base::HistogramBase::kUmaTargetedHistogramFlag)
->Add(timer.Elapsed().InMicroseconds());
base::StringPrintf("Compositing.%s.LayersUpdateTime", client_name);
base::UmaHistogramCounts10M(histogram_name, elapsed);
// Also add UpdateLayers metrics bucketed by the layer count.
base::StringAppendF(&histogram_name, ".%d",
GetLayersUpdateTimeHistogramBucket(NumLayers()));
base::UmaHistogramCounts10M(histogram_name, elapsed);
}
return result;
......
......@@ -10980,8 +10980,7 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary>
</histogram>
<histogram base="true" name="Compositing.Browser.LayersUpdateTime"
units="microseconds">
<histogram name="Compositing.Browser.LayersUpdateTime" units="microseconds">
<owner>animations-dev@chromium.org</owner>
<summary>
Time spent updating layers, in microseconds. Recorded when layers are
......@@ -11420,8 +11419,7 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary>
</histogram>
<histogram base="true" name="Compositing.Renderer.LayersUpdateTime"
units="microseconds">
<histogram name="Compositing.Renderer.LayersUpdateTime" units="microseconds">
<owner>animations-dev@chromium.org</owner>
<summary>
Time spent updating layers, in microseconds. Recorded when layers are
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