Commit 5279e0fe authored by Tanja Gornak's avatar Tanja Gornak Committed by Commit Bot

Track number of received invalidations per datatype for Chrome Sync.

Bug: 894764
Change-Id: If190cdf6396b567c9ab5e983d67d4f25b20d501b
Reviewed-on: https://chromium-review.googlesource.com/c/1278787Reviewed-by: default avatarJesse Doherty <jwd@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Tatiana Gornak <melandory@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599500}
parent 31629aed
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/files/file_util.h" #include "base/files/file_util.h"
#include "base/location.h" #include "base/location.h"
#include "base/metrics/histogram_macros.h"
#include "base/threading/sequenced_task_runner_handle.h" #include "base/threading/sequenced_task_runner_handle.h"
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "base/trace_event/memory_dump_manager.h" #include "base/trace_event/memory_dump_manager.h"
...@@ -248,6 +249,9 @@ void SyncBackendHostCore::DoOnIncomingInvalidation( ...@@ -248,6 +249,9 @@ void SyncBackendHostCore::DoOnIncomingInvalidation(
DLOG(WARNING) << "Notification has invalid id: " DLOG(WARNING) << "Notification has invalid id: "
<< ObjectIdToString(object_id); << ObjectIdToString(object_id);
} else { } else {
UMA_HISTOGRAM_ENUMERATION("Sync.InvalidationPerModelType",
ModelTypeToHistogramInt(type),
static_cast<int>(MODEL_TYPE_COUNT));
SingleObjectInvalidationSet invalidation_set = SingleObjectInvalidationSet invalidation_set =
invalidation_map.ForObject(object_id); invalidation_map.ForObject(object_id);
for (Invalidation invalidation : invalidation_set) { for (Invalidation invalidation : invalidation_set) {
......
...@@ -106090,6 +106090,14 @@ uploading your change for review. ...@@ -106090,6 +106090,14 @@ uploading your change for review.
</summary> </summary>
</histogram> </histogram>
<histogram base="true" name="Sync.InvalidationPerModelType"
enum="SyncModelTypes" expires_after="M75">
<owner>melandory@chromium.org</owner>
<summary>
Histogram tracks the number of invalidations received per sync data type.
</summary>
</histogram>
<histogram name="Sync.InvalidationSessionsAndroid" enum="BooleanHit"> <histogram name="Sync.InvalidationSessionsAndroid" enum="BooleanHit">
<obsolete> <obsolete>
Deprecated as of 5/2016. Deprecated as of 5/2016.
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