Skip to content

Commit

Permalink
Moving sync init type metric outside is deferred check.
Browse files Browse the repository at this point in the history
If there is a data type that's calling flare repetitively, this change will capture metrics exposing that. Previously the type was only logged when startup was already deferred, but if sync is in a failure/flare loop, the type would have been completely missed.

BUG=639897

Review-Url: https://codereview.chromium.org/2262383002
Cr-Commit-Position: refs/heads/master@{#413739}
  • Loading branch information
skym authored and Commit bot committed Aug 23, 2016
1 parent 2400c46 commit a959b6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/sync/driver/startup_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ void StartupController::OnDataTypeRequestsSyncStartup(syncer::ModelType type) {
// Measure the time spent waiting for init and the type that triggered it.
// We could measure the time spent deferred on a per-datatype basis, but
// for now this is probably sufficient.
UMA_HISTOGRAM_ENUMERATION("Sync.Startup.TypeTriggeringInit",
ModelTypeToHistogramInt(type),
syncer::MODEL_TYPE_COUNT);
if (!start_up_time_.is_null()) {
RecordTimeDeferred();
UMA_HISTOGRAM_ENUMERATION("Sync.Startup.TypeTriggeringInit",
ModelTypeToHistogramInt(type),
syncer::MODEL_TYPE_COUNT);
UMA_HISTOGRAM_ENUMERATION("Sync.Startup.DeferredInitTrigger",
TRIGGER_DATA_TYPE_REQUEST, MAX_TRIGGER_VALUE);
}
Expand Down

0 comments on commit a959b6f

Please sign in to comment.