0

Add histogram to time loading of independent metrics.

Bug: 882892
Change-Id: I91d2cf5b46b8ef3b790b5e00692a053686ba17d1
Reviewed-on: https://chromium-review.googlesource.com/1236460
Commit-Queue: Brian White <bcwhite@chromium.org>
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593245}
This commit is contained in:
Brian White
2018-09-21 17:32:23 +00:00
committed by Commit Bot
parent 2465463e81
commit 8d50b33a93
2 changed files with 12 additions and 0 deletions
components/metrics
tools/metrics/histograms

@ -729,9 +729,12 @@ bool FileMetricsProvider::ProvideIndependentMetrics(
bool success = false;
RecordEmbeddedProfileResult(EMBEDDED_PROFILE_ATTEMPT);
base::Time start_time = base::Time::Now();
if (PersistentSystemProfile::GetSystemProfile(
*source->allocator->memory_allocator(), system_profile_proto)) {
RecordHistogramSnapshotsFromSource(snapshot_manager, source);
UMA_HISTOGRAM_TIMES("UMA.FileMetricsProvider.EmbeddedProfile.RecordTime",
base::Time::Now() - start_time);
success = true;
RecordEmbeddedProfileResult(EMBEDDED_PROFILE_FOUND);
} else {

@ -109612,6 +109612,15 @@ uploading your change for review.
</summary>
</histogram>
<histogram name="UMA.FileMetricsProvider.EmbeddedProfile.RecordTime" units="ms"
expires_after="M71">
<owner>bcwhite@chromium.org</owner>
<summary>
Tracks the time used to record all histograms from a file with an embedded
profile.
</summary>
</histogram>
<histogram name="UMA.FileMetricsProvider.EmbeddedProfileResult"
enum="FileMetricsProviderEmbeddedProfileResult">
<owner>asvitkine@chromium.org</owner>