Commit 2348b44d authored by Julia Tuttle's avatar Julia Tuttle Committed by Commit Bot

Reporting: Move histograms to Net.Reporting.* namespace.

...and take the opportunity to prune and reorder enums.

Change-Id: I260f24bbe33781f27d41cf37296be0b84070f26f
Reviewed-on: https://chromium-review.googlesource.com/957163
Commit-Queue: Julia Tuttle <juliatuttle@chromium.org>
Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543775}
parent 4b0cdbb3
...@@ -26,15 +26,15 @@ enum class HeaderOutcome { ...@@ -26,15 +26,15 @@ enum class HeaderOutcome {
DISCARDED_NO_REPORTING_SERVICE = 0, DISCARDED_NO_REPORTING_SERVICE = 0,
DISCARDED_INVALID_SSL_INFO = 1, DISCARDED_INVALID_SSL_INFO = 1,
DISCARDED_CERT_STATUS_ERROR = 2, DISCARDED_CERT_STATUS_ERROR = 2,
DISCARDED_JSON_INVALID = 3, DISCARDED_JSON_TOO_BIG = 3,
PARSED = 4, DISCARDED_JSON_INVALID = 4,
DISCARDED_JSON_TOO_BIG = 5, PARSED = 5,
MAX MAX
}; };
void RecordHeaderOutcome(HeaderOutcome outcome) { void RecordHeaderOutcome(HeaderOutcome outcome) {
UMA_HISTOGRAM_ENUMERATION("Reporting.HeaderOutcome", outcome, UMA_HISTOGRAM_ENUMERATION("Net.Reporting.HeaderOutcome", outcome,
HeaderOutcome::MAX); HeaderOutcome::MAX);
} }
...@@ -46,38 +46,30 @@ enum class HeaderEndpointGroupOutcome { ...@@ -46,38 +46,30 @@ enum class HeaderEndpointGroupOutcome {
DISCARDED_TTL_NEGATIVE = 4, DISCARDED_TTL_NEGATIVE = 4,
DISCARDED_ENDPOINTS_MISSING = 5, DISCARDED_ENDPOINTS_MISSING = 5,
DISCARDED_ENDPOINTS_NOT_LIST = 6, DISCARDED_ENDPOINTS_NOT_LIST = 6,
PARSED = 7, PARSED = 7,
MAX MAX
}; };
void RecordHeaderEndpointGroupOutcome(HeaderEndpointGroupOutcome outcome) { void RecordHeaderEndpointGroupOutcome(HeaderEndpointGroupOutcome outcome) {
UMA_HISTOGRAM_ENUMERATION("Reporting.HeaderEndpointGroupOutcome", outcome, UMA_HISTOGRAM_ENUMERATION("Net.Reporting.HeaderEndpointGroupOutcome", outcome,
HeaderEndpointGroupOutcome::MAX); HeaderEndpointGroupOutcome::MAX);
} }
enum class HeaderEndpointOutcome { enum class HeaderEndpointOutcome {
DISCARDED_NOT_DICTIONARY = 0, DISCARDED_NOT_DICTIONARY = 0,
DISCARDED_ENDPOINT_MISSING = 1, // obsolete DISCARDED_URL_MISSING = 1,
DISCARDED_ENDPOINT_NOT_STRING = 2, // obsolete DISCARDED_URL_NOT_STRING = 2,
DISCARDED_ENDPOINT_INVALID = 3, // obsolete DISCARDED_URL_INVALID = 3,
DISCARDED_ENDPOINT_INSECURE = 4, // obsolete DISCARDED_URL_INSECURE = 4,
DISCARDED_TTL_MISSING = 5, // obsolete DISCARDED_PRIORITY_NOT_INTEGER = 5,
DISCARDED_TTL_NOT_INTEGER = 6, // obsolete DISCARDED_WEIGHT_NOT_INTEGER = 6,
DISCARDED_TTL_NEGATIVE = 7, // obsolete DISCARDED_WEIGHT_NOT_POSITIVE = 7,
DISCARDED_GROUP_NOT_STRING = 8, // obsolete
REMOVED = 9, REMOVED = 8,
SET_REJECTED_BY_DELEGATE = 10, SET_REJECTED_BY_DELEGATE = 9,
SET = 11, SET = 10,
DISCARDED_PRIORITY_NOT_INTEGER = 12,
DISCARDED_WEIGHT_NOT_INTEGER = 13,
DISCARDED_WEIGHT_NOT_POSITIVE = 14,
DISCARDED_URL_MISSING = 15,
DISCARDED_URL_NOT_STRING = 16,
DISCARDED_URL_INVALID = 17,
DISCARDED_URL_INSECURE = 18,
MAX MAX
}; };
...@@ -89,7 +81,7 @@ bool EndpointParsedSuccessfully(HeaderEndpointOutcome outcome) { ...@@ -89,7 +81,7 @@ bool EndpointParsedSuccessfully(HeaderEndpointOutcome outcome) {
} }
void RecordHeaderEndpointOutcome(HeaderEndpointOutcome outcome) { void RecordHeaderEndpointOutcome(HeaderEndpointOutcome outcome) {
UMA_HISTOGRAM_ENUMERATION("Reporting.HeaderEndpointOutcome", outcome, UMA_HISTOGRAM_ENUMERATION("Net.Reporting.HeaderEndpointOutcome", outcome,
HeaderEndpointOutcome::MAX); HeaderEndpointOutcome::MAX);
} }
......
...@@ -18,7 +18,7 @@ namespace net { ...@@ -18,7 +18,7 @@ namespace net {
namespace { namespace {
void RecordReportOutcome(ReportingReport::Outcome outcome) { void RecordReportOutcome(ReportingReport::Outcome outcome) {
UMA_HISTOGRAM_ENUMERATION("Reporting.ReportOutcome", outcome, UMA_HISTOGRAM_ENUMERATION("Net.Reporting.ReportOutcome", outcome,
ReportingReport::Outcome::MAX); ReportingReport::Outcome::MAX);
} }
...@@ -59,9 +59,9 @@ void ReportingReport::RecordOutcome(base::TimeTicks now) { ...@@ -59,9 +59,9 @@ void ReportingReport::RecordOutcome(base::TimeTicks now) {
RecordReportOutcome(outcome); RecordReportOutcome(outcome);
if (outcome == Outcome::DELIVERED) { if (outcome == Outcome::DELIVERED) {
UMA_HISTOGRAM_LONG_TIMES_100("Reporting.ReportDeliveredLatency", UMA_HISTOGRAM_LONG_TIMES_100("Net.Reporting.ReportDeliveredLatency",
now - queued); now - queued);
UMA_HISTOGRAM_COUNTS_100("Reporting.ReportDeliveredAttempts", attempts); UMA_HISTOGRAM_COUNTS_100("Net.Reporting.ReportDeliveredAttempts", attempts);
} }
recorded_outcome = true; recorded_outcome = true;
......
...@@ -33,7 +33,6 @@ struct NET_EXPORT ReportingReport { ...@@ -33,7 +33,6 @@ struct NET_EXPORT ReportingReport {
ERASED_BROWSING_DATA_REMOVED = 7, ERASED_BROWSING_DATA_REMOVED = 7,
ERASED_REPORTING_SHUT_DOWN = 8, ERASED_REPORTING_SHUT_DOWN = 8,
DELIVERED = 9, DELIVERED = 9,
ERASED_NO_BACKGROUND_SYNC_PERMISSION = 10,
MAX MAX
}; };
......
...@@ -30301,6 +30301,53 @@ Called by update_net_error_codes.py.--> ...@@ -30301,6 +30301,53 @@ Called by update_net_error_codes.py.-->
<int value="8" label="subresource and used"/> <int value="8" label="subresource and used"/>
</enum> </enum>
<enum name="NetReportingHeaderEndpointGroupOutcome">
<int value="0" label="Discarded: not a dictionary"/>
<int value="1" label="Discarded: group not a string"/>
<int value="2" label="Discarded: TTL missing"/>
<int value="3" label="Discarded: TTL not an integer"/>
<int value="4" label="Discarded: TTL negative"/>
<int value="5" label="Discarded: endpoints missing"/>
<int value="6" label="Discarded: endpoints not a list"/>
<int value="7" label="Parsed"/>
</enum>
<enum name="NetReportingHeaderEndpointOutcome">
<int value="0" label="Discarded: not a dictionary"/>
<int value="1" label="Discarded: URL missing"/>
<int value="2" label="Discarded: URL not a string"/>
<int value="3" label="Discarded: URL invalid"/>
<int value="4" label="Discarded: URL insecure"/>
<int value="5" label="Discarded: priority not an integer"/>
<int value="6" label="Discarded: weight not an integer"/>
<int value="7" label="Discarded: weight not positive"/>
<int value="8" label="Removed (max-age = 0)"/>
<int value="9" label="Set rejected by delegate (max-age &gt; 0)"/>
<int value="10" label="Set (max-age &gt; 0)"/>
</enum>
<enum name="NetReportingHeaderOutcome">
<int value="0" label="Discarded: no ReportingService"/>
<int value="1" label="Discarded: invalid SSLInfo"/>
<int value="2" label="Discarded: cert status error"/>
<int value="3" label="Discarded: JSON too big"/>
<int value="4" label="Discarded: JSON invalid"/>
<int value="5" label="Parsed"/>
</enum>
<enum name="NetReportingReportOutcome">
<int value="0" label="Unknown"/>
<int value="1" label="Discarded: no URLRequestContext"/>
<int value="2" label="Discarded: no ReportingService"/>
<int value="3" label="Erased: failed"/>
<int value="4" label="Erased: expired"/>
<int value="5" label="Erased: evicted"/>
<int value="6" label="Erased: network changed"/>
<int value="7" label="Erased: browsing data removed"/>
<int value="8" label="Erased: Reporting shut down"/>
<int value="9" label="Delivered"/>
</enum>
<enum name="NetTrustAnchors"> <enum name="NetTrustAnchors">
<!-- Generated from net/data/ssl/root_stores/root_stores.json. <!-- Generated from net/data/ssl/root_stores/root_stores.json.
Called by update_net_trust_anchors.py.--> Called by update_net_trust_anchors.py.-->
...@@ -37953,6 +38000,9 @@ Called by update_net_trust_anchors.py.--> ...@@ -37953,6 +38000,9 @@ Called by update_net_trust_anchors.py.-->
</enum> </enum>
<enum name="ReportingHeaderEndpointGroupOutcome"> <enum name="ReportingHeaderEndpointGroupOutcome">
<obsolete>
Moved to NetReportingHeaderEndpointGroupOutcome.
</obsolete>
<int value="0" label="Discarded: not a dictionary"/> <int value="0" label="Discarded: not a dictionary"/>
<int value="1" label="Discarded: group not a string"/> <int value="1" label="Discarded: group not a string"/>
<int value="2" label="Discarded: TTL missing"/> <int value="2" label="Discarded: TTL missing"/>
...@@ -37964,6 +38014,9 @@ Called by update_net_trust_anchors.py.--> ...@@ -37964,6 +38014,9 @@ Called by update_net_trust_anchors.py.-->
</enum> </enum>
<enum name="ReportingHeaderEndpointOutcome"> <enum name="ReportingHeaderEndpointOutcome">
<obsolete>
Moved to NetReportingHeaderEndpointOutcome.
</obsolete>
<int value="0" label="Discarded: not a dictionary"/> <int value="0" label="Discarded: not a dictionary"/>
<int value="1" label="Discarded: endpoint missing (obsolete)"/> <int value="1" label="Discarded: endpoint missing (obsolete)"/>
<int value="2" label="Discarded: endpoint not a string (obsolete)"/> <int value="2" label="Discarded: endpoint not a string (obsolete)"/>
...@@ -37986,6 +38039,9 @@ Called by update_net_trust_anchors.py.--> ...@@ -37986,6 +38039,9 @@ Called by update_net_trust_anchors.py.-->
</enum> </enum>
<enum name="ReportingHeaderOutcome"> <enum name="ReportingHeaderOutcome">
<obsolete>
Moved to NetReportingHeaderOutcome.
</obsolete>
<int value="0" label="Discarded: no ReportingService"/> <int value="0" label="Discarded: no ReportingService"/>
<int value="1" label="Discarded: invalid SSLInfo"/> <int value="1" label="Discarded: invalid SSLInfo"/>
<int value="2" label="Discarded: cert status error"/> <int value="2" label="Discarded: cert status error"/>
...@@ -37995,6 +38051,9 @@ Called by update_net_trust_anchors.py.--> ...@@ -37995,6 +38051,9 @@ Called by update_net_trust_anchors.py.-->
</enum> </enum>
<enum name="ReportingReportOutcome"> <enum name="ReportingReportOutcome">
<obsolete>
Moved to NetReportingReportOutcome.
</obsolete>
<int value="0" label="Unknown"/> <int value="0" label="Unknown"/>
<int value="1" label="Discarded: no URLRequestContext"/> <int value="1" label="Discarded: no URLRequestContext"/>
<int value="2" label="Discarded: no ReportingService"/> <int value="2" label="Discarded: no ReportingService"/>
...@@ -48330,6 +48330,58 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -48330,6 +48330,58 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary> </summary>
</histogram> </histogram>
<histogram name="Net.Reporting.HeaderEndpointGroupOutcome"
enum="NetReportingHeaderEndpointGroupOutcome">
<owner>juliatuttle@chromium.org</owner>
<summary>
The outcome of Reporting trying to process a single endpoint group in a
Report-To header once the header itself has been parsed.
</summary>
</histogram>
<histogram name="Net.Reporting.HeaderEndpointOutcome"
enum="NetReportingHeaderEndpointOutcome">
<owner>juliatuttle@chromium.org</owner>
<summary>
The outcome of Reporting trying to process a single endpoint in a Report-To
header once the header itself has been parsed.
</summary>
</histogram>
<histogram name="Net.Reporting.HeaderOutcome" enum="NetReportingHeaderOutcome">
<owner>juliatuttle@chromium.org</owner>
<summary>
The outcome of Reporting trying to process a Report-To header. Once it is
parsed, Reporting.HeaderEndpointOutcome records the outcome of the endpoints
within it.
</summary>
</histogram>
<histogram name="Net.Reporting.ReportDeliveredAttempts" units="attempts">
<owner>juliatuttle@chromium.org</owner>
<summary>
When Reporting successfully delivers a report, the number of unsuccessful
delivery attempts that preceded the successful one.
</summary>
</histogram>
<histogram name="Net.Reporting.ReportDeliveredLatency" units="ms">
<owner>juliatuttle@chromium.org</owner>
<summary>
The delivery latency of reports successfully delivered by Reporting. Starts
when the report is queued and finishes when the delivery attempt returns
successfully.
</summary>
</histogram>
<histogram name="Net.Reporting.ReportOutcome" enum="NetReportingReportOutcome">
<owner>juliatuttle@chromium.org</owner>
<summary>
The outcome of Reporting trying to deliver a report, recorded when the
report is finally erased from memory.
</summary>
</histogram>
<histogram name="Net.RequestTime"> <histogram name="Net.RequestTime">
<obsolete> <obsolete>
Replaced by Net.RequestTime2 due to bug in original implementation. Replaced by Net.RequestTime2 due to bug in original implementation.
...@@ -73608,6 +73660,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -73608,6 +73660,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
<histogram name="Reporting.HeaderEndpointGroupOutcome" <histogram name="Reporting.HeaderEndpointGroupOutcome"
enum="ReportingHeaderEndpointGroupOutcome"> enum="ReportingHeaderEndpointGroupOutcome">
<obsolete>
Moved to Net.Reporting.HeaderEndpointGroupOutcome.
</obsolete>
<owner>juliatuttle@chromium.org</owner> <owner>juliatuttle@chromium.org</owner>
<summary> <summary>
The outcome of Reporting trying to process a single endpoint group in a The outcome of Reporting trying to process a single endpoint group in a
...@@ -73617,6 +73672,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -73617,6 +73672,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
<histogram name="Reporting.HeaderEndpointOutcome" <histogram name="Reporting.HeaderEndpointOutcome"
enum="ReportingHeaderEndpointOutcome"> enum="ReportingHeaderEndpointOutcome">
<obsolete>
Moved to Net.Reporting.HeaderEndpointOutcome.
</obsolete>
<owner>juliatuttle@chromium.org</owner> <owner>juliatuttle@chromium.org</owner>
<summary> <summary>
The outcome of Reporting trying to process a single endpoint in a Report-To The outcome of Reporting trying to process a single endpoint in a Report-To
...@@ -73625,6 +73683,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -73625,6 +73683,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram> </histogram>
<histogram name="Reporting.HeaderOutcome" enum="ReportingHeaderOutcome"> <histogram name="Reporting.HeaderOutcome" enum="ReportingHeaderOutcome">
<obsolete>
Moved to Net.Reporting.HeaderOutcome.
</obsolete>
<owner>juliatuttle@chromium.org</owner> <owner>juliatuttle@chromium.org</owner>
<summary> <summary>
The outcome of Reporting trying to process a Report-To header. Once it is The outcome of Reporting trying to process a Report-To header. Once it is
...@@ -73634,6 +73695,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -73634,6 +73695,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram> </histogram>
<histogram name="Reporting.ReportDeliveredAttempts" units="attempts"> <histogram name="Reporting.ReportDeliveredAttempts" units="attempts">
<obsolete>
Moved to Net.Reporting.ReportDeliveredAttempts.
</obsolete>
<owner>juliatuttle@chromium.org</owner> <owner>juliatuttle@chromium.org</owner>
<summary> <summary>
When Reporting successfully delivers a report, the number of unsuccessful When Reporting successfully delivers a report, the number of unsuccessful
...@@ -73642,6 +73706,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -73642,6 +73706,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram> </histogram>
<histogram name="Reporting.ReportDeliveredLatency" units="ms"> <histogram name="Reporting.ReportDeliveredLatency" units="ms">
<obsolete>
Moved to Net.Reporting.ReportDeliveredLatency.
</obsolete>
<owner>juliatuttle@chromium.org</owner> <owner>juliatuttle@chromium.org</owner>
<summary> <summary>
The delivery latency of reports successfully delivered by Reporting. Starts The delivery latency of reports successfully delivered by Reporting. Starts
...@@ -73651,6 +73718,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -73651,6 +73718,9 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram> </histogram>
<histogram name="Reporting.ReportOutcome" enum="ReportingReportOutcome"> <histogram name="Reporting.ReportOutcome" enum="ReportingReportOutcome">
<obsolete>
Moved to Net.Reporting.ReportOutcome.
</obsolete>
<owner>juliatuttle@chromium.org</owner> <owner>juliatuttle@chromium.org</owner>
<summary> <summary>
The outcome of Reporting trying to deliver a report, recorded when the The outcome of Reporting trying to deliver a report, recorded when the
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