Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: sync/engine/process_updates_util.cc

Issue 1273303002: Measuring data use of different ModelTypes in Sync Service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NewServices
Patch Set: Changing the initialization of vectors in syncer_unittest.cc Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/engine/directory_update_handler.cc ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/process_updates_util.cc
diff --git a/sync/engine/process_updates_util.cc b/sync/engine/process_updates_util.cc
index 9b428ef929bd9c8ba80705e028dd91f8ce2a39bb..e1931d7de7786aff24becefd1fa73bacedffaea7 100644
--- a/sync/engine/process_updates_util.cc
+++ b/sync/engine/process_updates_util.cc
@@ -5,6 +5,7 @@
#include "sync/engine/process_updates_util.h"
#include "base/location.h"
+#include "base/metrics/sparse_histogram.h"
#include "sync/engine/syncer_proto_util.h"
#include "sync/engine/syncer_types.h"
#include "sync/engine/syncer_util.h"
@@ -15,6 +16,7 @@
#include "sync/syncable/syncable_proto_util.h"
#include "sync/syncable/syncable_util.h"
#include "sync/util/cryptographer.h"
+#include "sync/util/data_type_histogram.h"
namespace syncer {
@@ -303,6 +305,13 @@ void ProcessDownloadedUpdates(
if (verify_result != VERIFY_SUCCESS && verify_result != VERIFY_UNDELETE)
continue;
ProcessUpdate(**update_it, dir->GetCryptographer(trans), trans);
+ if ((*update_it)->ByteSize() > 0) {
+ SyncRecordDatatypeBin("DataUse.Sync.Download.Bytes",
+ ModelTypeToHistogramInt(type),
+ (*update_it)->ByteSize());
+ }
+ UMA_HISTOGRAM_SPARSE_SLOWLY("DataUse.Sync.Download.Count",
+ ModelTypeToHistogramInt(type));
}
}
« no previous file with comments | « sync/engine/directory_update_handler.cc ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698