model_type_processor_metrics.h 1.1 KB

123456789101112131415161718192021222324252627
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_SYNC_ENGINE_MODEL_TYPE_PROCESSOR_METRICS_H_
  5. #define COMPONENTS_SYNC_ENGINE_MODEL_TYPE_PROCESSOR_METRICS_H_
  6. #include "base/time/time.h"
  7. #include "components/sync/base/model_type.h"
  8. namespace syncer {
  9. // Logs histograms representing the number of updates that an implementations of
  10. // ModelTypeProcessor receive via OnUpdateReceived().
  11. void LogUpdatesReceivedByProcessorHistogram(ModelType model_type,
  12. bool is_initial_sync,
  13. size_t num_updates);
  14. // Logs histogram representing the staleness of an incoming incremental
  15. // (non-initial) update, when received by a ModelTypeProcessor via
  16. // OnUpdateReceived().
  17. void LogNonReflectionUpdateFreshnessToUma(ModelType type,
  18. base::Time remote_modification_time);
  19. } // namespace syncer
  20. #endif // COMPONENTS_SYNC_ENGINE_MODEL_TYPE_PROCESSOR_METRICS_H_