Bug 1956726 - Migrate histograms to use Glean APIs for REL_PRELOAD_MISS_RATIO, r=chutten,necko-reviewers,sunil.
Differential Revision: https://phabricator.services.mozilla.com/D244294
This commit is contained in:
@@ -3168,3 +3168,42 @@ network:
|
|||||||
- necko@mozilla.com
|
- necko@mozilla.com
|
||||||
expires: never
|
expires: never
|
||||||
telemetry_mirror: IPV4_AND_IPV6_ADDRESS_CONNECTIVITY
|
telemetry_mirror: IPV4_AND_IPV6_ADDRESS_CONNECTIVITY
|
||||||
|
|
||||||
|
rel_preload_miss_ratio:
|
||||||
|
type: labeled_counter
|
||||||
|
description: >
|
||||||
|
Ratio of used and unused resources preloaded with link rel=preload tag or
|
||||||
|
response header, broken down by supported resource type.
|
||||||
|
|
||||||
|
This metric was generated to correspond to the Legacy Telemetry
|
||||||
|
categorical histogram REL_PRELOAD_MISS_RATIO.
|
||||||
|
labels:
|
||||||
|
- TYPE_SCRIPT_USED
|
||||||
|
- TYPE_SCRIPT_UNUSED
|
||||||
|
- TYPE_STYLE_USED
|
||||||
|
- TYPE_STYLE_UNUSED
|
||||||
|
- TYPE_IMAGE_USED
|
||||||
|
- TYPE_IMAGE_UNUSED
|
||||||
|
- TYPE_FONT_USED
|
||||||
|
- TYPE_FONT_UNUSED
|
||||||
|
- TYPE_FETCH_USED
|
||||||
|
- TYPE_FETCH_UNUSED
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1658532
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1583604
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1666981
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1700831
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1736687
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1777403
|
||||||
|
data_reviews:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1658532
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1583604
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1666981
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1700831
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1736687
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1777403
|
||||||
|
notification_emails:
|
||||||
|
- necko@mozilla.com
|
||||||
|
- kershaw@mozilla.com
|
||||||
|
expires: never
|
||||||
|
telemetry_mirror: h#REL_PRELOAD_MISS_RATIO
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#include "PreloaderBase.h"
|
#include "PreloaderBase.h"
|
||||||
|
|
||||||
#include "mozilla/dom/Document.h"
|
#include "mozilla/dom/Document.h"
|
||||||
#include "mozilla/Telemetry.h"
|
#include "mozilla/glean/NetwerkMetrics.h"
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
#include "nsIAsyncVerifyRedirectCallback.h"
|
#include "nsIAsyncVerifyRedirectCallback.h"
|
||||||
#include "nsIHttpChannel.h"
|
#include "nsIHttpChannel.h"
|
||||||
@@ -322,8 +322,8 @@ void PreloaderBase::ReportUsageTelemetry() {
|
|||||||
++index;
|
++index;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto label = static_cast<Telemetry::LABELS_REL_PRELOAD_MISS_RATIO>(index);
|
auto label = static_cast<glean::network::RelPreloadMissRatioLabel>(index);
|
||||||
Telemetry::AccumulateCategorical(label);
|
glean::network::rel_preload_miss_ratio.EnumGet(label).Add();
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult PreloaderBase::AsyncConsume(nsIStreamListener* aListener) {
|
nsresult PreloaderBase::AsyncConsume(nsIStreamListener* aListener) {
|
||||||
|
|||||||
Reference in New Issue
Block a user