[NTP::Push] Add metrics

Desktop / Chromium - Marc Treib [chromium.org] - 31 August 2017 04:18 EDT

The following metrics are added in this CL:

1) Our payload size in a received message.

2) Subscription request status.

3) Unsubscription request status.

4) Time since last token validation.

5) Token retrieval (independently whether inside or outside validations) result.

6) Number of validations, when the token was retrieved and the old token was valid/invalid.

Bug: 744557 Change-Id: I61d65a20000363bd62aa296a7d9f66a94d0c90e7 Reviewed-on: https://chromium-review.googlesource.com/632685

9f15f3b [NTP::Push] Add metrics.
base/metrics/histogram_macros.h | 2 +-
components/ntp_snippets/BUILD.gn | 2 +
.../breaking_news/breaking_news_gcm_app_handler.cc | 56 ++++---
.../breaking_news_gcm_app_handler_unittest.cc | 175 ++++++++++++++++++++-
.../breaking_news/breaking_news_metrics.cc | 71 +++++++++
.../breaking_news/breaking_news_metrics.h | 33 ++++
.../breaking_news/subscription_manager_impl.cc | 5 +
.../subscription_manager_impl_unittest.cc | 50 ++++++
components/ntp_snippets/status.h | 15 +-
.../browser/content_suggestions/mediator_util.mm | 3 +
tools/metrics/histograms/enums.xml | 16 ++
tools/metrics/histograms/histograms.xml | 67 ++++++++
12 files changed, 468 insertions(+), 27 deletions(-)

Upstream: git.chromium.org


  • Share