forked from mirrors/gecko-dev
Bug 1931277 - [128esr] Support for Configuring a Subset of Interesting Metrics to Collect. r=TravisLong a=pascalc
Needs https://github.com/mozilla/glean_parser/pull/774 This is an 128esr version of D228971 Differential Revision: https://phabricator.services.mozilla.com/D242676
This commit is contained in:
parent
fa10d681d1
commit
c28f1b278b
13 changed files with 1490 additions and 84 deletions
|
|
@ -7,11 +7,13 @@
|
||||||
import pickle
|
import pickle
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
import buildconfig
|
||||||
from run_glean_parser import parse
|
from run_glean_parser import parse
|
||||||
|
|
||||||
|
|
||||||
def main(out_fd, *args):
|
def main(out_fd, *args):
|
||||||
parse_result = parse(args)
|
interesting_yamls = buildconfig.substs.get("MOZ_GLEAN_INTERESTING_METRICS_FILES")
|
||||||
|
parse_result = parse(args, interesting_yamls)
|
||||||
pickle.dump(parse_result, out_fd)
|
pickle.dump(parse_result, out_fd)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import cpp
|
||||||
import jinja2
|
import jinja2
|
||||||
import jog
|
import jog
|
||||||
import rust
|
import rust
|
||||||
|
from buildconfig import topsrcdir
|
||||||
from glean_parser import lint, metrics, parser, translate, util
|
from glean_parser import lint, metrics, parser, translate, util
|
||||||
from mozbuild.util import FileAvoidWrite, memoize
|
from mozbuild.util import FileAvoidWrite, memoize
|
||||||
from util import generate_metric_ids
|
from util import generate_metric_ids
|
||||||
|
|
@ -63,10 +64,14 @@ def get_parser_options(moz_app_version):
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def parse(args):
|
def parse(args, interesting_yamls=None):
|
||||||
"""
|
"""
|
||||||
Parse and lint the input files,
|
Parse and lint the input files,
|
||||||
then return the parsed objects for further processing.
|
then return the parsed objects for further processing.
|
||||||
|
|
||||||
|
:param interesting_yamls: If set, the "opt-in" list of metrics to actually
|
||||||
|
collect. Other metrics not listed in files in this list will be marked
|
||||||
|
disabled and thus not collected (only built).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if len(args) == 2 and args[0].endswith(".cached"):
|
if len(args) == 2 and args[0].endswith(".cached"):
|
||||||
|
|
@ -78,10 +83,14 @@ def parse(args):
|
||||||
# instead of listifying either, so we need to pull stuff from a *args.
|
# instead of listifying either, so we need to pull stuff from a *args.
|
||||||
yaml_array = args[:-1]
|
yaml_array = args[:-1]
|
||||||
moz_app_version = args[-1]
|
moz_app_version = args[-1]
|
||||||
|
|
||||||
input_files = [Path(x) for x in yaml_array]
|
input_files = [Path(x) for x in yaml_array]
|
||||||
|
|
||||||
options = get_parser_options(moz_app_version)
|
options = get_parser_options(moz_app_version)
|
||||||
|
if interesting_yamls:
|
||||||
|
# We need to make these paths absolute here. They are used from at least
|
||||||
|
# two different contexts.
|
||||||
|
interesting = [Path(os.path.join(topsrcdir, x)) for x in interesting_yamls]
|
||||||
|
options.update({"interesting": interesting})
|
||||||
|
|
||||||
return parse_with_options(input_files, options)
|
return parse_with_options(input_files, options)
|
||||||
|
|
||||||
|
|
@ -124,11 +133,8 @@ def main(cpp_fd, *args):
|
||||||
# We only need this info if we're dealing with pings.
|
# We only need this info if we're dealing with pings.
|
||||||
ping_names_by_app_id = {}
|
ping_names_by_app_id = {}
|
||||||
if "pings" in all_objs:
|
if "pings" in all_objs:
|
||||||
import sys
|
|
||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
from buildconfig import topsrcdir
|
|
||||||
|
|
||||||
sys.path.append(path.join(path.dirname(__file__), path.pardir, path.pardir))
|
sys.path.append(path.join(path.dirname(__file__), path.pardir, path.pardir))
|
||||||
from metrics_index import pings_by_app_id
|
from metrics_index import pings_by_app_id
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,8 @@ SOURCES += [
|
||||||
include("metrics_index.py")
|
include("metrics_index.py")
|
||||||
|
|
||||||
# Allow defining metrics/pings/tags elsewhere (like for Thunderbird).
|
# Allow defining metrics/pings/tags elsewhere (like for Thunderbird).
|
||||||
|
# See https://source-docs.thunderbird.net/en/latest/telemetry/index.html
|
||||||
|
# See also: MOZ_GLEAN_INTERESTING_METRICS_FILES
|
||||||
if CONFIG["MOZ_GLEAN_EXTRA_METRICS_FILES"]:
|
if CONFIG["MOZ_GLEAN_EXTRA_METRICS_FILES"]:
|
||||||
metrics_yamls.extend(CONFIG["MOZ_GLEAN_EXTRA_METRICS_FILES"])
|
metrics_yamls.extend(CONFIG["MOZ_GLEAN_EXTRA_METRICS_FILES"])
|
||||||
metrics_yamls = sorted(metrics_yamls)
|
metrics_yamls = sorted(metrics_yamls)
|
||||||
|
|
|
||||||
435
toolkit/components/glean/tests/pytest/metrics2_test.yaml
Normal file
435
toolkit/components/glean/tests/pytest/metrics2_test.yaml
Normal file
|
|
@ -0,0 +1,435 @@
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
# This file defines the metrics that are recorded by the Glean SDK. They are
|
||||||
|
# automatically converted to platform-specific code at build time using the
|
||||||
|
# `glean_parser` PyPI package.
|
||||||
|
|
||||||
|
# Semi-copy of metrics_test.yaml, only that this uses test2 and that uses test.
|
||||||
|
---
|
||||||
|
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
|
||||||
|
|
||||||
|
test2:
|
||||||
|
boolean_metric:
|
||||||
|
type: boolean
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: application
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
telemetry_mirror: SOME_BOOL_SCALAR
|
||||||
|
no_lint:
|
||||||
|
- GIFFT_NON_PING_LIFETIME
|
||||||
|
|
||||||
|
labeled_boolean_metric:
|
||||||
|
type: labeled_boolean
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: application
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
telemetry_mirror: SOME_KEYED_BOOL_SCALAR
|
||||||
|
no_lint:
|
||||||
|
- GIFFT_NON_PING_LIFETIME
|
||||||
|
|
||||||
|
labeled_boolean_metric_labels:
|
||||||
|
type: labeled_boolean
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: application
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
labels:
|
||||||
|
- one_label
|
||||||
|
- two_labels
|
||||||
|
- three_labels
|
||||||
|
- four_labels
|
||||||
|
- five_labels
|
||||||
|
- six_labels
|
||||||
|
- seven_labels
|
||||||
|
- eight_labels
|
||||||
|
- nine_labels
|
||||||
|
- ten_labels
|
||||||
|
telemetry_mirror: SOME_OTHER_KEYED_BOOL_SCALAR
|
||||||
|
no_lint:
|
||||||
|
- GIFFT_NON_PING_LIFETIME
|
||||||
|
|
||||||
|
counter_metric:
|
||||||
|
type: counter
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: application
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
telemetry_mirror: SOME_UINT_SCALAR
|
||||||
|
no_lint:
|
||||||
|
- GIFFT_NON_PING_LIFETIME
|
||||||
|
|
||||||
|
labeled_counter_metric:
|
||||||
|
type: labeled_counter
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: application
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
telemetry_mirror: SOME_KEYED_UINT_SCALAR
|
||||||
|
no_lint:
|
||||||
|
- GIFFT_NON_PING_LIFETIME
|
||||||
|
|
||||||
|
labeled_counter_metric_labels:
|
||||||
|
type: labeled_counter
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: application
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
labels:
|
||||||
|
- one_label
|
||||||
|
- two_labels
|
||||||
|
telemetry_mirror: SOME_OTHER_KEYED_UINT_SCALAR
|
||||||
|
no_lint:
|
||||||
|
- GIFFT_NON_PING_LIFETIME
|
||||||
|
|
||||||
|
string_metric:
|
||||||
|
type: string
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: application
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
telemetry_mirror: SOME_STRING_SCALAR
|
||||||
|
no_lint:
|
||||||
|
- GIFFT_NON_PING_LIFETIME
|
||||||
|
|
||||||
|
labeled_string_metric:
|
||||||
|
type: labeled_string
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: application
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
|
||||||
|
labeled_string_metric_labels:
|
||||||
|
type: labeled_string
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: application
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
labels:
|
||||||
|
- one_label
|
||||||
|
- two_labels
|
||||||
|
|
||||||
|
string_list_metric:
|
||||||
|
type: string_list
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: application
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
telemetry_mirror: YET_ANOTHER_KEYED_BOOL_SCALAR
|
||||||
|
no_lint:
|
||||||
|
- GIFFT_NON_PING_LIFETIME
|
||||||
|
|
||||||
|
text_metric:
|
||||||
|
type: text
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: application
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/show_bug.cgi?id=1828528
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
|
||||||
|
|
||||||
|
timespan_metric:
|
||||||
|
type: timespan
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: application
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
telemetry_mirror: SOME_OTHER_UINT_SCALAR
|
||||||
|
no_lint:
|
||||||
|
- GIFFT_NON_PING_LIFETIME
|
||||||
|
|
||||||
|
timing_distribution_metric:
|
||||||
|
type: timing_distribution
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
telemetry_mirror: SOME_TIME_HISTOGRAM_MS
|
||||||
|
|
||||||
|
memory_distribution_metric:
|
||||||
|
type: memory_distribution
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
memory_unit: kilobyte
|
||||||
|
telemetry_mirror: SOME_MEM_HISTOGRAM_KB
|
||||||
|
|
||||||
|
custom_distribution_metric:
|
||||||
|
type: custom_distribution
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
range_min: 0
|
||||||
|
range_max: 100
|
||||||
|
bucket_count: 100
|
||||||
|
histogram_type: linear
|
||||||
|
telemetry_mirror: SOME_LINEAR_HISTOGRAM
|
||||||
|
|
||||||
|
test2.nested:
|
||||||
|
uuid_metric:
|
||||||
|
type: uuid
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: application
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
telemetry_mirror: SOME_OTHER_STRING_SCALAR
|
||||||
|
no_lint:
|
||||||
|
- GIFFT_NON_PING_LIFETIME
|
||||||
|
|
||||||
|
datetime_metric:
|
||||||
|
type: datetime
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: application
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
telemetry_mirror: SOME_STILL_OTHER_STRING_SCALAR
|
||||||
|
no_lint:
|
||||||
|
- GIFFT_NON_PING_LIFETIME
|
||||||
|
|
||||||
|
event_metric:
|
||||||
|
type: event
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: ping
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
telemetry_mirror: EventMetric_EnumNames_AreStrange
|
||||||
|
|
||||||
|
event_metric_with_extra:
|
||||||
|
type: event
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: ping
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
extra_keys:
|
||||||
|
an_extra_key:
|
||||||
|
type: string
|
||||||
|
description: An extra key description
|
||||||
|
another_extra_key:
|
||||||
|
type: string
|
||||||
|
description: Another extra key description
|
||||||
|
telemetry_mirror: EventMetric_EnumName_WithExtra
|
||||||
|
|
||||||
|
quantity_metric:
|
||||||
|
type: quantity
|
||||||
|
unit: someunit
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1704846/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
telemetry_mirror: TELEMETRY_TEST_MIRROR_FOR_QUANTITY
|
||||||
|
|
||||||
|
rate_metric:
|
||||||
|
type: rate
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1704846/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
|
||||||
|
rate_with_external_denominator:
|
||||||
|
type: rate
|
||||||
|
denominator_metric: test.nested.external_denominator
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1704846/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
|
||||||
|
external_denominator:
|
||||||
|
type: counter
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1704846/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
|
||||||
|
optimizable_counter_metric:
|
||||||
|
type: counter
|
||||||
|
expires: never
|
||||||
|
description: |
|
||||||
|
A multi-line
|
||||||
|
description
|
||||||
|
lifetime: ping
|
||||||
|
notification_emails:
|
||||||
|
- glean-team@mozilla.com
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1635260/
|
||||||
|
data_reviews:
|
||||||
|
- https://example.com
|
||||||
|
|
||||||
|
an_object:
|
||||||
|
type: object
|
||||||
|
description: An example object
|
||||||
|
bugs:
|
||||||
|
- https://bugzilla.mozilla.org/1839640
|
||||||
|
data_reviews:
|
||||||
|
- http://example.com/reviews
|
||||||
|
notification_emails:
|
||||||
|
- CHANGE-ME@example.com
|
||||||
|
expires: never
|
||||||
|
structure:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
colour:
|
||||||
|
type: string
|
||||||
|
diameter:
|
||||||
|
type: number
|
||||||
|
CamelCasedParameter:
|
||||||
|
type: number
|
||||||
|
|
@ -474,7 +474,7 @@ pub mod test_nested {
|
||||||
lifetime: Lifetime::Ping,
|
lifetime: Lifetime::Ping,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}, vec![CommonMetricData {name: "rate_with_external_denominator".into(), category: "test.nested".into(), send_in_pings: vec!["metrics".into()], lifetime: Lifetime::Ping, disabled: false, ..Default::default()}])
|
}, vec![CommonMetricData {name: "rate_with_external_denominator".into(), category: "test.nested".into(), send_in_pings: vec!["metrics".into()], lifetime: Lifetime::Ping, disabled: false, ..Default::default()}, CommonMetricData {name: "rate_with_external_denominator".into(), category: "test2.nested".into(), send_in_pings: vec!["metrics".into()], lifetime: Lifetime::Ping, disabled: true, ..Default::default()}])
|
||||||
});
|
});
|
||||||
|
|
||||||
#[allow(non_upper_case_globals)]
|
#[allow(non_upper_case_globals)]
|
||||||
|
|
@ -555,6 +555,555 @@ pub mod test_nested {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
pub mod test2 {
|
||||||
|
use crate::private::*;
|
||||||
|
#[allow(unused_imports)] // CommonMetricData might be unused, let's avoid warnings
|
||||||
|
use glean::CommonMetricData;
|
||||||
|
#[allow(unused_imports)] // HistogramType might be unusued, let's avoid warnings
|
||||||
|
use glean::HistogramType;
|
||||||
|
use once_cell::sync::Lazy;
|
||||||
|
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use std::convert::TryFrom;
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.boolean_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static boolean_metric: Lazy<BooleanMetric> = Lazy::new(|| {
|
||||||
|
BooleanMetric::new(26.into(), CommonMetricData {
|
||||||
|
name: "boolean_metric".into(),
|
||||||
|
category: "test2".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Application,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.counter_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static counter_metric: Lazy<CounterMetric> = Lazy::new(|| {
|
||||||
|
CounterMetric::new(27.into(), CommonMetricData {
|
||||||
|
name: "counter_metric".into(),
|
||||||
|
category: "test2".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Application,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.custom_distribution_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static custom_distribution_metric: Lazy<CustomDistributionMetric> = Lazy::new(|| {
|
||||||
|
CustomDistributionMetric::new(28.into(), CommonMetricData {
|
||||||
|
name: "custom_distribution_metric".into(),
|
||||||
|
category: "test2".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Ping,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
}, 0, 100, 100, HistogramType::Linear)
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.labeled_boolean_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static labeled_boolean_metric: Lazy<LabeledMetric<LabeledBooleanMetric, super::DynamicLabel>> = Lazy::new(|| {
|
||||||
|
LabeledMetric::new(29.into(), CommonMetricData {
|
||||||
|
name: "labeled_boolean_metric".into(),
|
||||||
|
category: "test2".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Application,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
}, None)
|
||||||
|
});
|
||||||
|
|
||||||
|
#[repr(u16)]
|
||||||
|
pub enum LabeledBooleanMetricLabelsLabel {
|
||||||
|
EOneLabel = 0,
|
||||||
|
ETwoLabels = 1,
|
||||||
|
EThreeLabels = 2,
|
||||||
|
EFourLabels = 3,
|
||||||
|
EFiveLabels = 4,
|
||||||
|
ESixLabels = 5,
|
||||||
|
ESevenLabels = 6,
|
||||||
|
EEightLabels = 7,
|
||||||
|
ENineLabels = 8,
|
||||||
|
ETenLabels = 9,
|
||||||
|
__Other__,
|
||||||
|
}
|
||||||
|
impl From<u16> for LabeledBooleanMetricLabelsLabel {
|
||||||
|
fn from(v: u16) -> Self {
|
||||||
|
match v {
|
||||||
|
0 => Self::EOneLabel,
|
||||||
|
1 => Self::ETwoLabels,
|
||||||
|
2 => Self::EThreeLabels,
|
||||||
|
3 => Self::EFourLabels,
|
||||||
|
4 => Self::EFiveLabels,
|
||||||
|
5 => Self::ESixLabels,
|
||||||
|
6 => Self::ESevenLabels,
|
||||||
|
7 => Self::EEightLabels,
|
||||||
|
8 => Self::ENineLabels,
|
||||||
|
9 => Self::ETenLabels,
|
||||||
|
_ => Self::__Other__,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl Into<&'static str> for LabeledBooleanMetricLabelsLabel {
|
||||||
|
fn into(self) -> &'static str {
|
||||||
|
match self {
|
||||||
|
Self::EOneLabel => "one_label",
|
||||||
|
Self::ETwoLabels => "two_labels",
|
||||||
|
Self::EThreeLabels => "three_labels",
|
||||||
|
Self::EFourLabels => "four_labels",
|
||||||
|
Self::EFiveLabels => "five_labels",
|
||||||
|
Self::ESixLabels => "six_labels",
|
||||||
|
Self::ESevenLabels => "seven_labels",
|
||||||
|
Self::EEightLabels => "eight_labels",
|
||||||
|
Self::ENineLabels => "nine_labels",
|
||||||
|
Self::ETenLabels => "ten_labels",
|
||||||
|
Self::__Other__ => "__other__",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.labeled_boolean_metric_labels
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static labeled_boolean_metric_labels: Lazy<LabeledMetric<LabeledBooleanMetric, LabeledBooleanMetricLabelsLabel>> = Lazy::new(|| {
|
||||||
|
LabeledMetric::new(30.into(), CommonMetricData {
|
||||||
|
name: "labeled_boolean_metric_labels".into(),
|
||||||
|
category: "test2".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Application,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
}, Some(vec![::std::borrow::Cow::from("eight_labels"), ::std::borrow::Cow::from("five_labels"), ::std::borrow::Cow::from("four_labels"), ::std::borrow::Cow::from("nine_labels"), ::std::borrow::Cow::from("one_label"), ::std::borrow::Cow::from("seven_labels"), ::std::borrow::Cow::from("six_labels"), ::std::borrow::Cow::from("ten_labels"), ::std::borrow::Cow::from("three_labels"), ::std::borrow::Cow::from("two_labels")]))
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.labeled_counter_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static labeled_counter_metric: Lazy<LabeledMetric<LabeledCounterMetric, super::DynamicLabel>> = Lazy::new(|| {
|
||||||
|
LabeledMetric::new(31.into(), CommonMetricData {
|
||||||
|
name: "labeled_counter_metric".into(),
|
||||||
|
category: "test2".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Application,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
}, None)
|
||||||
|
});
|
||||||
|
|
||||||
|
#[repr(u16)]
|
||||||
|
pub enum LabeledCounterMetricLabelsLabel {
|
||||||
|
EOneLabel = 0,
|
||||||
|
ETwoLabels = 1,
|
||||||
|
__Other__,
|
||||||
|
}
|
||||||
|
impl From<u16> for LabeledCounterMetricLabelsLabel {
|
||||||
|
fn from(v: u16) -> Self {
|
||||||
|
match v {
|
||||||
|
0 => Self::EOneLabel,
|
||||||
|
1 => Self::ETwoLabels,
|
||||||
|
_ => Self::__Other__,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl Into<&'static str> for LabeledCounterMetricLabelsLabel {
|
||||||
|
fn into(self) -> &'static str {
|
||||||
|
match self {
|
||||||
|
Self::EOneLabel => "one_label",
|
||||||
|
Self::ETwoLabels => "two_labels",
|
||||||
|
Self::__Other__ => "__other__",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.labeled_counter_metric_labels
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static labeled_counter_metric_labels: Lazy<LabeledMetric<LabeledCounterMetric, LabeledCounterMetricLabelsLabel>> = Lazy::new(|| {
|
||||||
|
LabeledMetric::new(32.into(), CommonMetricData {
|
||||||
|
name: "labeled_counter_metric_labels".into(),
|
||||||
|
category: "test2".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Application,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
}, Some(vec![::std::borrow::Cow::from("one_label"), ::std::borrow::Cow::from("two_labels")]))
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.labeled_string_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static labeled_string_metric: Lazy<LabeledMetric<LabeledStringMetric, super::DynamicLabel>> = Lazy::new(|| {
|
||||||
|
LabeledMetric::new(33.into(), CommonMetricData {
|
||||||
|
name: "labeled_string_metric".into(),
|
||||||
|
category: "test2".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Application,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
}, None)
|
||||||
|
});
|
||||||
|
|
||||||
|
#[repr(u16)]
|
||||||
|
pub enum LabeledStringMetricLabelsLabel {
|
||||||
|
EOneLabel = 0,
|
||||||
|
ETwoLabels = 1,
|
||||||
|
__Other__,
|
||||||
|
}
|
||||||
|
impl From<u16> for LabeledStringMetricLabelsLabel {
|
||||||
|
fn from(v: u16) -> Self {
|
||||||
|
match v {
|
||||||
|
0 => Self::EOneLabel,
|
||||||
|
1 => Self::ETwoLabels,
|
||||||
|
_ => Self::__Other__,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl Into<&'static str> for LabeledStringMetricLabelsLabel {
|
||||||
|
fn into(self) -> &'static str {
|
||||||
|
match self {
|
||||||
|
Self::EOneLabel => "one_label",
|
||||||
|
Self::ETwoLabels => "two_labels",
|
||||||
|
Self::__Other__ => "__other__",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.labeled_string_metric_labels
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static labeled_string_metric_labels: Lazy<LabeledMetric<LabeledStringMetric, LabeledStringMetricLabelsLabel>> = Lazy::new(|| {
|
||||||
|
LabeledMetric::new(34.into(), CommonMetricData {
|
||||||
|
name: "labeled_string_metric_labels".into(),
|
||||||
|
category: "test2".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Application,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
}, Some(vec![::std::borrow::Cow::from("one_label"), ::std::borrow::Cow::from("two_labels")]))
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.memory_distribution_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static memory_distribution_metric: Lazy<MemoryDistributionMetric> = Lazy::new(|| {
|
||||||
|
MemoryDistributionMetric::new(35.into(), CommonMetricData {
|
||||||
|
name: "memory_distribution_metric".into(),
|
||||||
|
category: "test2".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Ping,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
}, MemoryUnit::Kilobyte)
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.string_list_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static string_list_metric: Lazy<StringListMetric> = Lazy::new(|| {
|
||||||
|
StringListMetric::new(36.into(), CommonMetricData {
|
||||||
|
name: "string_list_metric".into(),
|
||||||
|
category: "test2".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Application,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.string_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static string_metric: Lazy<StringMetric> = Lazy::new(|| {
|
||||||
|
StringMetric::new(37.into(), CommonMetricData {
|
||||||
|
name: "string_metric".into(),
|
||||||
|
category: "test2".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Application,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.text_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static text_metric: Lazy<TextMetric> = Lazy::new(|| {
|
||||||
|
TextMetric::new(38.into(), CommonMetricData {
|
||||||
|
name: "text_metric".into(),
|
||||||
|
category: "test2".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Application,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.timespan_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static timespan_metric: Lazy<TimespanMetric> = Lazy::new(|| {
|
||||||
|
TimespanMetric::new(39.into(), CommonMetricData {
|
||||||
|
name: "timespan_metric".into(),
|
||||||
|
category: "test2".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Application,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
}, TimeUnit::Millisecond)
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.timing_distribution_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static timing_distribution_metric: Lazy<TimingDistributionMetric> = Lazy::new(|| {
|
||||||
|
TimingDistributionMetric::new(40.into(), CommonMetricData {
|
||||||
|
name: "timing_distribution_metric".into(),
|
||||||
|
category: "test2".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Ping,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
}, TimeUnit::Nanosecond)
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
pub mod test2_nested {
|
||||||
|
use crate::private::*;
|
||||||
|
#[allow(unused_imports)] // CommonMetricData might be unused, let's avoid warnings
|
||||||
|
use glean::CommonMetricData;
|
||||||
|
#[allow(unused_imports)] // HistogramType might be unusued, let's avoid warnings
|
||||||
|
use glean::HistogramType;
|
||||||
|
use once_cell::sync::Lazy;
|
||||||
|
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use std::convert::TryFrom;
|
||||||
|
|
||||||
|
pub type AnObjectObject = Vec<AnObjectObjectItem>;
|
||||||
|
|
||||||
|
#[derive(Debug, Hash, Eq, PartialEq, ::glean::traits::__serde::Serialize, ::glean::traits::__serde::Deserialize)]
|
||||||
|
#[allow(non_snake_case)]
|
||||||
|
#[serde(deny_unknown_fields)]
|
||||||
|
pub struct AnObjectObjectItem {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub colour: Option<String>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub diameter: Option<i64>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub CamelCasedParameter: Option<i64>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.nested.an_object
|
||||||
|
///
|
||||||
|
/// An example object
|
||||||
|
pub static an_object: Lazy<ObjectMetric<AnObjectObject>> = Lazy::new(|| {
|
||||||
|
ObjectMetric::new(41.into(), CommonMetricData {
|
||||||
|
name: "an_object".into(),
|
||||||
|
category: "test2.nested".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Ping,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.nested.datetime_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static datetime_metric: Lazy<DatetimeMetric> = Lazy::new(|| {
|
||||||
|
DatetimeMetric::new(42.into(), CommonMetricData {
|
||||||
|
name: "datetime_metric".into(),
|
||||||
|
category: "test2.nested".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Application,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
}, TimeUnit::Millisecond)
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.nested.event_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static event_metric: Lazy<EventMetric<NoExtraKeys>> = Lazy::new(|| {
|
||||||
|
EventMetric::new(43.into(), CommonMetricData {
|
||||||
|
name: "event_metric".into(),
|
||||||
|
category: "test2.nested".into(),
|
||||||
|
send_in_pings: vec!["events".into()],
|
||||||
|
lifetime: Lifetime::Ping,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#[derive(Default, Debug, Clone, Hash, Eq, PartialEq)]
|
||||||
|
pub struct EventMetricWithExtraExtra {
|
||||||
|
pub an_extra_key: Option<String>,
|
||||||
|
pub another_extra_key: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ExtraKeys for EventMetricWithExtraExtra {
|
||||||
|
const ALLOWED_KEYS: &'static [&'static str] = &["an_extra_key", "another_extra_key"];
|
||||||
|
|
||||||
|
fn into_ffi_extra(self) -> ::std::collections::HashMap<String, String> {
|
||||||
|
let mut map = ::std::collections::HashMap::new();
|
||||||
|
self.an_extra_key.and_then(|val| map.insert("an_extra_key".into(), val.to_string()));
|
||||||
|
self.another_extra_key.and_then(|val| map.insert("another_extra_key".into(), val.to_string()));
|
||||||
|
map
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.nested.event_metric_with_extra
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static event_metric_with_extra: Lazy<EventMetric<EventMetricWithExtraExtra>> = Lazy::new(|| {
|
||||||
|
EventMetric::new(44.into(), CommonMetricData {
|
||||||
|
name: "event_metric_with_extra".into(),
|
||||||
|
category: "test2.nested".into(),
|
||||||
|
send_in_pings: vec!["events".into()],
|
||||||
|
lifetime: Lifetime::Ping,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.nested.external_denominator
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static external_denominator: Lazy<CounterMetric> = Lazy::new(|| {
|
||||||
|
CounterMetric::new(45.into(), CommonMetricData {
|
||||||
|
name: "external_denominator".into(),
|
||||||
|
category: "test2.nested".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Ping,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.nested.optimizable_counter_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static optimizable_counter_metric: Lazy<CounterMetric> = Lazy::new(|| {
|
||||||
|
CounterMetric::new(46.into(), CommonMetricData {
|
||||||
|
name: "optimizable_counter_metric".into(),
|
||||||
|
category: "test2.nested".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Ping,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.nested.quantity_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static quantity_metric: Lazy<QuantityMetric> = Lazy::new(|| {
|
||||||
|
QuantityMetric::new(47.into(), CommonMetricData {
|
||||||
|
name: "quantity_metric".into(),
|
||||||
|
category: "test2.nested".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Ping,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.nested.rate_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static rate_metric: Lazy<RateMetric> = Lazy::new(|| {
|
||||||
|
RateMetric::new(48.into(), CommonMetricData {
|
||||||
|
name: "rate_metric".into(),
|
||||||
|
category: "test2.nested".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Ping,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.nested.rate_with_external_denominator
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static rate_with_external_denominator: Lazy<NumeratorMetric> = Lazy::new(|| {
|
||||||
|
NumeratorMetric::new(49.into(), CommonMetricData {
|
||||||
|
name: "rate_with_external_denominator".into(),
|
||||||
|
category: "test2.nested".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Ping,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
|
/// generated from test2.nested.uuid_metric
|
||||||
|
///
|
||||||
|
/// A multi-line
|
||||||
|
/// description
|
||||||
|
pub static uuid_metric: Lazy<UuidMetric> = Lazy::new(|| {
|
||||||
|
UuidMetric::new(50.into(), CommonMetricData {
|
||||||
|
name: "uuid_metric".into(),
|
||||||
|
category: "test2.nested".into(),
|
||||||
|
send_in_pings: vec!["metrics".into()],
|
||||||
|
lifetime: Lifetime::Application,
|
||||||
|
disabled: true,
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
|
|
@ -566,63 +1115,75 @@ pub(crate) mod __glean_metric_maps {
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
|
||||||
pub static BOOLEAN_MAP: Lazy<HashMap<MetricId, &Lazy<BooleanMetric>>> = Lazy::new(|| {
|
pub static BOOLEAN_MAP: Lazy<HashMap<MetricId, &Lazy<BooleanMetric>>> = Lazy::new(|| {
|
||||||
let mut map = HashMap::with_capacity(1);
|
let mut map = HashMap::with_capacity(2);
|
||||||
map.insert(1.into(), &super::test::boolean_metric);
|
map.insert(1.into(), &super::test::boolean_metric);
|
||||||
|
map.insert(26.into(), &super::test2::boolean_metric);
|
||||||
map
|
map
|
||||||
});
|
});
|
||||||
|
|
||||||
pub static COUNTER_MAP: Lazy<HashMap<MetricId, &Lazy<CounterMetric>>> = Lazy::new(|| {
|
pub static COUNTER_MAP: Lazy<HashMap<MetricId, &Lazy<CounterMetric>>> = Lazy::new(|| {
|
||||||
let mut map = HashMap::with_capacity(2);
|
let mut map = HashMap::with_capacity(5);
|
||||||
map.insert(2.into(), &super::test::counter_metric);
|
map.insert(2.into(), &super::test::counter_metric);
|
||||||
map.insert(21.into(), &super::test_nested::optimizable_counter_metric);
|
map.insert(21.into(), &super::test_nested::optimizable_counter_metric);
|
||||||
|
map.insert(27.into(), &super::test2::counter_metric);
|
||||||
|
map.insert(45.into(), &super::test2_nested::external_denominator);
|
||||||
|
map.insert(46.into(), &super::test2_nested::optimizable_counter_metric);
|
||||||
map
|
map
|
||||||
});
|
});
|
||||||
|
|
||||||
pub static CUSTOM_DISTRIBUTION_MAP: Lazy<HashMap<MetricId, &Lazy<CustomDistributionMetric>>> = Lazy::new(|| {
|
pub static CUSTOM_DISTRIBUTION_MAP: Lazy<HashMap<MetricId, &Lazy<CustomDistributionMetric>>> = Lazy::new(|| {
|
||||||
let mut map = HashMap::with_capacity(1);
|
let mut map = HashMap::with_capacity(2);
|
||||||
map.insert(3.into(), &super::test::custom_distribution_metric);
|
map.insert(3.into(), &super::test::custom_distribution_metric);
|
||||||
|
map.insert(28.into(), &super::test2::custom_distribution_metric);
|
||||||
map
|
map
|
||||||
});
|
});
|
||||||
|
|
||||||
pub static MEMORY_DISTRIBUTION_MAP: Lazy<HashMap<MetricId, &Lazy<MemoryDistributionMetric>>> = Lazy::new(|| {
|
pub static MEMORY_DISTRIBUTION_MAP: Lazy<HashMap<MetricId, &Lazy<MemoryDistributionMetric>>> = Lazy::new(|| {
|
||||||
let mut map = HashMap::with_capacity(1);
|
let mut map = HashMap::with_capacity(2);
|
||||||
map.insert(10.into(), &super::test::memory_distribution_metric);
|
map.insert(10.into(), &super::test::memory_distribution_metric);
|
||||||
|
map.insert(35.into(), &super::test2::memory_distribution_metric);
|
||||||
map
|
map
|
||||||
});
|
});
|
||||||
|
|
||||||
pub static STRING_LIST_MAP: Lazy<HashMap<MetricId, &Lazy<StringListMetric>>> = Lazy::new(|| {
|
pub static STRING_LIST_MAP: Lazy<HashMap<MetricId, &Lazy<StringListMetric>>> = Lazy::new(|| {
|
||||||
let mut map = HashMap::with_capacity(1);
|
let mut map = HashMap::with_capacity(2);
|
||||||
map.insert(11.into(), &super::test::string_list_metric);
|
map.insert(11.into(), &super::test::string_list_metric);
|
||||||
|
map.insert(36.into(), &super::test2::string_list_metric);
|
||||||
map
|
map
|
||||||
});
|
});
|
||||||
|
|
||||||
pub static STRING_MAP: Lazy<HashMap<MetricId, &Lazy<StringMetric>>> = Lazy::new(|| {
|
pub static STRING_MAP: Lazy<HashMap<MetricId, &Lazy<StringMetric>>> = Lazy::new(|| {
|
||||||
let mut map = HashMap::with_capacity(1);
|
let mut map = HashMap::with_capacity(2);
|
||||||
map.insert(12.into(), &super::test::string_metric);
|
map.insert(12.into(), &super::test::string_metric);
|
||||||
|
map.insert(37.into(), &super::test2::string_metric);
|
||||||
map
|
map
|
||||||
});
|
});
|
||||||
|
|
||||||
pub static TEXT_MAP: Lazy<HashMap<MetricId, &Lazy<TextMetric>>> = Lazy::new(|| {
|
pub static TEXT_MAP: Lazy<HashMap<MetricId, &Lazy<TextMetric>>> = Lazy::new(|| {
|
||||||
let mut map = HashMap::with_capacity(1);
|
let mut map = HashMap::with_capacity(2);
|
||||||
map.insert(13.into(), &super::test::text_metric);
|
map.insert(13.into(), &super::test::text_metric);
|
||||||
|
map.insert(38.into(), &super::test2::text_metric);
|
||||||
map
|
map
|
||||||
});
|
});
|
||||||
|
|
||||||
pub static TIMESPAN_MAP: Lazy<HashMap<MetricId, &Lazy<TimespanMetric>>> = Lazy::new(|| {
|
pub static TIMESPAN_MAP: Lazy<HashMap<MetricId, &Lazy<TimespanMetric>>> = Lazy::new(|| {
|
||||||
let mut map = HashMap::with_capacity(1);
|
let mut map = HashMap::with_capacity(2);
|
||||||
map.insert(14.into(), &super::test::timespan_metric);
|
map.insert(14.into(), &super::test::timespan_metric);
|
||||||
|
map.insert(39.into(), &super::test2::timespan_metric);
|
||||||
map
|
map
|
||||||
});
|
});
|
||||||
|
|
||||||
pub static TIMING_DISTRIBUTION_MAP: Lazy<HashMap<MetricId, &Lazy<TimingDistributionMetric>>> = Lazy::new(|| {
|
pub static TIMING_DISTRIBUTION_MAP: Lazy<HashMap<MetricId, &Lazy<TimingDistributionMetric>>> = Lazy::new(|| {
|
||||||
let mut map = HashMap::with_capacity(1);
|
let mut map = HashMap::with_capacity(2);
|
||||||
map.insert(15.into(), &super::test::timing_distribution_metric);
|
map.insert(15.into(), &super::test::timing_distribution_metric);
|
||||||
|
map.insert(40.into(), &super::test2::timing_distribution_metric);
|
||||||
map
|
map
|
||||||
});
|
});
|
||||||
|
|
||||||
pub static DATETIME_MAP: Lazy<HashMap<MetricId, &Lazy<DatetimeMetric>>> = Lazy::new(|| {
|
pub static DATETIME_MAP: Lazy<HashMap<MetricId, &Lazy<DatetimeMetric>>> = Lazy::new(|| {
|
||||||
let mut map = HashMap::with_capacity(1);
|
let mut map = HashMap::with_capacity(2);
|
||||||
map.insert(17.into(), &super::test_nested::datetime_metric);
|
map.insert(17.into(), &super::test_nested::datetime_metric);
|
||||||
|
map.insert(42.into(), &super::test2_nested::datetime_metric);
|
||||||
map
|
map
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -633,26 +1194,30 @@ pub(crate) mod __glean_metric_maps {
|
||||||
});
|
});
|
||||||
|
|
||||||
pub static QUANTITY_MAP: Lazy<HashMap<MetricId, &Lazy<QuantityMetric>>> = Lazy::new(|| {
|
pub static QUANTITY_MAP: Lazy<HashMap<MetricId, &Lazy<QuantityMetric>>> = Lazy::new(|| {
|
||||||
let mut map = HashMap::with_capacity(1);
|
let mut map = HashMap::with_capacity(2);
|
||||||
map.insert(22.into(), &super::test_nested::quantity_metric);
|
map.insert(22.into(), &super::test_nested::quantity_metric);
|
||||||
|
map.insert(47.into(), &super::test2_nested::quantity_metric);
|
||||||
map
|
map
|
||||||
});
|
});
|
||||||
|
|
||||||
pub static RATE_MAP: Lazy<HashMap<MetricId, &Lazy<RateMetric>>> = Lazy::new(|| {
|
pub static RATE_MAP: Lazy<HashMap<MetricId, &Lazy<RateMetric>>> = Lazy::new(|| {
|
||||||
let mut map = HashMap::with_capacity(1);
|
let mut map = HashMap::with_capacity(2);
|
||||||
map.insert(23.into(), &super::test_nested::rate_metric);
|
map.insert(23.into(), &super::test_nested::rate_metric);
|
||||||
|
map.insert(48.into(), &super::test2_nested::rate_metric);
|
||||||
map
|
map
|
||||||
});
|
});
|
||||||
|
|
||||||
pub static NUMERATOR_MAP: Lazy<HashMap<MetricId, &Lazy<NumeratorMetric>>> = Lazy::new(|| {
|
pub static NUMERATOR_MAP: Lazy<HashMap<MetricId, &Lazy<NumeratorMetric>>> = Lazy::new(|| {
|
||||||
let mut map = HashMap::with_capacity(1);
|
let mut map = HashMap::with_capacity(2);
|
||||||
map.insert(24.into(), &super::test_nested::rate_with_external_denominator);
|
map.insert(24.into(), &super::test_nested::rate_with_external_denominator);
|
||||||
|
map.insert(49.into(), &super::test2_nested::rate_with_external_denominator);
|
||||||
map
|
map
|
||||||
});
|
});
|
||||||
|
|
||||||
pub static UUID_MAP: Lazy<HashMap<MetricId, &Lazy<UuidMetric>>> = Lazy::new(|| {
|
pub static UUID_MAP: Lazy<HashMap<MetricId, &Lazy<UuidMetric>>> = Lazy::new(|| {
|
||||||
let mut map = HashMap::with_capacity(1);
|
let mut map = HashMap::with_capacity(2);
|
||||||
map.insert(25.into(), &super::test_nested::uuid_metric);
|
map.insert(25.into(), &super::test_nested::uuid_metric);
|
||||||
|
map.insert(50.into(), &super::test2_nested::uuid_metric);
|
||||||
map
|
map
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -662,6 +1227,10 @@ pub(crate) mod __glean_metric_maps {
|
||||||
16 => {
|
16 => {
|
||||||
super::test_nested::an_object.set_string(value);
|
super::test_nested::an_object.set_string(value);
|
||||||
Ok(())
|
Ok(())
|
||||||
|
}
|
||||||
|
41 => {
|
||||||
|
super::test2_nested::an_object.set_string(value);
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
_ => Err(()),
|
_ => Err(()),
|
||||||
}
|
}
|
||||||
|
|
@ -685,6 +1254,7 @@ pub(crate) mod __glean_metric_maps {
|
||||||
pub(crate) fn object_test_get_value(metric_id: u32, ping_name: Option<String>) -> Option<String> {
|
pub(crate) fn object_test_get_value(metric_id: u32, ping_name: Option<String>) -> Option<String> {
|
||||||
match metric_id {
|
match metric_id {
|
||||||
16 => super::test_nested::an_object.test_get_value_as_str(ping_name.as_deref()),
|
16 => super::test_nested::an_object.test_get_value_as_str(ping_name.as_deref()),
|
||||||
|
41 => super::test2_nested::an_object.test_get_value_as_str(ping_name.as_deref()),
|
||||||
_ => panic!("No object for metric id {}", metric_id),
|
_ => panic!("No object for metric id {}", metric_id),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -707,6 +1277,7 @@ pub(crate) mod __glean_metric_maps {
|
||||||
#[cfg(feature = "with_gecko")]
|
#[cfg(feature = "with_gecko")]
|
||||||
match metric_id {
|
match metric_id {
|
||||||
16 => test_get_errors!(super::test_nested::an_object),
|
16 => test_get_errors!(super::test_nested::an_object),
|
||||||
|
41 => test_get_errors!(super::test2_nested::an_object),
|
||||||
_ => panic!("No object for metric id {}", metric_id),
|
_ => panic!("No object for metric id {}", metric_id),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -747,6 +1318,24 @@ pub(crate) mod __glean_metric_maps {
|
||||||
|
|
||||||
super::test_nested::event_metric_with_extra.record_raw(extra);
|
super::test_nested::event_metric_with_extra.record_raw(extra);
|
||||||
Ok(())
|
Ok(())
|
||||||
|
}
|
||||||
|
43 => {
|
||||||
|
assert!(
|
||||||
|
extra_keys_len(&super::test2_nested::event_metric) != 0 || extra.is_empty(),
|
||||||
|
"No extra keys allowed, but some were passed"
|
||||||
|
);
|
||||||
|
|
||||||
|
super::test2_nested::event_metric.record_raw(extra);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
44 => {
|
||||||
|
assert!(
|
||||||
|
extra_keys_len(&super::test2_nested::event_metric_with_extra) != 0 || extra.is_empty(),
|
||||||
|
"No extra keys allowed, but some were passed"
|
||||||
|
);
|
||||||
|
|
||||||
|
super::test2_nested::event_metric_with_extra.record_raw(extra);
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
_ => Err(EventRecordingError::InvalidId),
|
_ => Err(EventRecordingError::InvalidId),
|
||||||
}
|
}
|
||||||
|
|
@ -783,6 +1372,22 @@ pub(crate) mod __glean_metric_maps {
|
||||||
|
|
||||||
super::test_nested::event_metric_with_extra.record_with_time(timestamp, extra);
|
super::test_nested::event_metric_with_extra.record_with_time(timestamp, extra);
|
||||||
Ok(())
|
Ok(())
|
||||||
|
}
|
||||||
|
MetricId(43) => {
|
||||||
|
if extra_keys_len(&super::test2_nested::event_metric) == 0 && !extra.is_empty() {
|
||||||
|
return Err(EventRecordingError::InvalidExtraKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
super::test2_nested::event_metric.record_with_time(timestamp, extra);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
MetricId(44) => {
|
||||||
|
if extra_keys_len(&super::test2_nested::event_metric_with_extra) == 0 && !extra.is_empty() {
|
||||||
|
return Err(EventRecordingError::InvalidExtraKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
super::test2_nested::event_metric_with_extra.record_with_time(timestamp, extra);
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
_ => Err(EventRecordingError::InvalidId),
|
_ => Err(EventRecordingError::InvalidId),
|
||||||
}
|
}
|
||||||
|
|
@ -807,6 +1412,8 @@ pub(crate) mod __glean_metric_maps {
|
||||||
match metric_id {
|
match metric_id {
|
||||||
18 => super::test_nested::event_metric.test_get_value(ping_name.as_deref()),
|
18 => super::test_nested::event_metric.test_get_value(ping_name.as_deref()),
|
||||||
19 => super::test_nested::event_metric_with_extra.test_get_value(ping_name.as_deref()),
|
19 => super::test_nested::event_metric_with_extra.test_get_value(ping_name.as_deref()),
|
||||||
|
43 => super::test2_nested::event_metric.test_get_value(ping_name.as_deref()),
|
||||||
|
44 => super::test2_nested::event_metric_with_extra.test_get_value(ping_name.as_deref()),
|
||||||
_ => panic!("No event for metric id {}", metric_id),
|
_ => panic!("No event for metric id {}", metric_id),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -832,6 +1439,8 @@ pub(crate) mod __glean_metric_maps {
|
||||||
match metric_id {
|
match metric_id {
|
||||||
18 => test_get_errors!(super::test_nested::event_metric),
|
18 => test_get_errors!(super::test_nested::event_metric),
|
||||||
19 => test_get_errors!(super::test_nested::event_metric_with_extra),
|
19 => test_get_errors!(super::test_nested::event_metric_with_extra),
|
||||||
|
43 => test_get_errors!(super::test2_nested::event_metric),
|
||||||
|
44 => test_get_errors!(super::test2_nested::event_metric_with_extra),
|
||||||
_ => panic!("No event for metric id {}", metric_id),
|
_ => panic!("No event for metric id {}", metric_id),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -860,6 +1469,8 @@ pub(crate) mod __glean_metric_maps {
|
||||||
match metric_id {
|
match metric_id {
|
||||||
4 => super::test::labeled_boolean_metric.get(label),
|
4 => super::test::labeled_boolean_metric.get(label),
|
||||||
5 => super::test::labeled_boolean_metric_labels.get(label),
|
5 => super::test::labeled_boolean_metric_labels.get(label),
|
||||||
|
29 => super::test2::labeled_boolean_metric.get(label),
|
||||||
|
30 => super::test2::labeled_boolean_metric_labels.get(label),
|
||||||
_ => panic!("No labeled_boolean for metric id {}", metric_id),
|
_ => panic!("No labeled_boolean for metric id {}", metric_id),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -882,6 +1493,7 @@ pub(crate) mod __glean_metric_maps {
|
||||||
pub(crate) fn labeled_boolean_enum_get(metric_id: u32, label_enum: u16) -> LabeledBooleanMetric {
|
pub(crate) fn labeled_boolean_enum_get(metric_id: u32, label_enum: u16) -> LabeledBooleanMetric {
|
||||||
match metric_id {
|
match metric_id {
|
||||||
5 => super::test::labeled_boolean_metric_labels.get(labeled_enum_to_str(metric_id, label_enum)),
|
5 => super::test::labeled_boolean_metric_labels.get(labeled_enum_to_str(metric_id, label_enum)),
|
||||||
|
30 => super::test2::labeled_boolean_metric_labels.get(labeled_enum_to_str(metric_id, label_enum)),
|
||||||
_ => panic!("No labeled_boolean for metric id {}", metric_id),
|
_ => panic!("No labeled_boolean for metric id {}", metric_id),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -904,6 +1516,8 @@ pub(crate) mod __glean_metric_maps {
|
||||||
match metric_id {
|
match metric_id {
|
||||||
6 => super::test::labeled_counter_metric.get(label),
|
6 => super::test::labeled_counter_metric.get(label),
|
||||||
7 => super::test::labeled_counter_metric_labels.get(label),
|
7 => super::test::labeled_counter_metric_labels.get(label),
|
||||||
|
31 => super::test2::labeled_counter_metric.get(label),
|
||||||
|
32 => super::test2::labeled_counter_metric_labels.get(label),
|
||||||
_ => panic!("No labeled_counter for metric id {}", metric_id),
|
_ => panic!("No labeled_counter for metric id {}", metric_id),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -926,6 +1540,7 @@ pub(crate) mod __glean_metric_maps {
|
||||||
pub(crate) fn labeled_counter_enum_get(metric_id: u32, label_enum: u16) -> LabeledCounterMetric {
|
pub(crate) fn labeled_counter_enum_get(metric_id: u32, label_enum: u16) -> LabeledCounterMetric {
|
||||||
match metric_id {
|
match metric_id {
|
||||||
7 => super::test::labeled_counter_metric_labels.get(labeled_enum_to_str(metric_id, label_enum)),
|
7 => super::test::labeled_counter_metric_labels.get(labeled_enum_to_str(metric_id, label_enum)),
|
||||||
|
32 => super::test2::labeled_counter_metric_labels.get(labeled_enum_to_str(metric_id, label_enum)),
|
||||||
_ => panic!("No labeled_counter for metric id {}", metric_id),
|
_ => panic!("No labeled_counter for metric id {}", metric_id),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -948,6 +1563,8 @@ pub(crate) mod __glean_metric_maps {
|
||||||
match metric_id {
|
match metric_id {
|
||||||
8 => super::test::labeled_string_metric.get(label),
|
8 => super::test::labeled_string_metric.get(label),
|
||||||
9 => super::test::labeled_string_metric_labels.get(label),
|
9 => super::test::labeled_string_metric_labels.get(label),
|
||||||
|
33 => super::test2::labeled_string_metric.get(label),
|
||||||
|
34 => super::test2::labeled_string_metric_labels.get(label),
|
||||||
_ => panic!("No labeled_string for metric id {}", metric_id),
|
_ => panic!("No labeled_string for metric id {}", metric_id),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -970,6 +1587,7 @@ pub(crate) mod __glean_metric_maps {
|
||||||
pub(crate) fn labeled_string_enum_get(metric_id: u32, label_enum: u16) -> LabeledStringMetric {
|
pub(crate) fn labeled_string_enum_get(metric_id: u32, label_enum: u16) -> LabeledStringMetric {
|
||||||
match metric_id {
|
match metric_id {
|
||||||
9 => super::test::labeled_string_metric_labels.get(labeled_enum_to_str(metric_id, label_enum)),
|
9 => super::test::labeled_string_metric_labels.get(labeled_enum_to_str(metric_id, label_enum)),
|
||||||
|
34 => super::test2::labeled_string_metric_labels.get(labeled_enum_to_str(metric_id, label_enum)),
|
||||||
_ => panic!("No labeled_string for metric id {}", metric_id),
|
_ => panic!("No labeled_string for metric id {}", metric_id),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -979,6 +1597,9 @@ pub(crate) mod __glean_metric_maps {
|
||||||
5 => super::test::LabeledBooleanMetricLabelsLabel::from(label).into(),
|
5 => super::test::LabeledBooleanMetricLabelsLabel::from(label).into(),
|
||||||
7 => super::test::LabeledCounterMetricLabelsLabel::from(label).into(),
|
7 => super::test::LabeledCounterMetricLabelsLabel::from(label).into(),
|
||||||
9 => super::test::LabeledStringMetricLabelsLabel::from(label).into(),
|
9 => super::test::LabeledStringMetricLabelsLabel::from(label).into(),
|
||||||
|
30 => super::test2::LabeledBooleanMetricLabelsLabel::from(label).into(),
|
||||||
|
32 => super::test2::LabeledCounterMetricLabelsLabel::from(label).into(),
|
||||||
|
34 => super::test2::LabeledStringMetricLabelsLabel::from(label).into(),
|
||||||
_ => panic!("Can't turn label enum to string for metric {} which isn't a labeled metric with static labels", metric_id),
|
_ => panic!("Can't turn label enum to string for metric {} which isn't a labeled metric with static labels", metric_id),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -281,6 +281,268 @@ namespace test_nested {
|
||||||
*/
|
*/
|
||||||
constexpr impl::UuidMetric uuid_metric(25);
|
constexpr impl::UuidMetric uuid_metric(25);
|
||||||
|
|
||||||
|
}
|
||||||
|
namespace test2 {
|
||||||
|
/**
|
||||||
|
* generated from test2.boolean_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::BooleanMetric boolean_metric(26);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.counter_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::CounterMetric counter_metric(27);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.custom_distribution_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::CustomDistributionMetric custom_distribution_metric(28);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.labeled_boolean_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::Labeled<impl::BooleanMetric, DynamicLabel> labeled_boolean_metric(29);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.labeled_boolean_metric_labels
|
||||||
|
*/
|
||||||
|
enum class LabeledBooleanMetricLabelsLabel: uint16_t {
|
||||||
|
eOneLabel = 0,
|
||||||
|
eTwoLabels = 1,
|
||||||
|
eThreeLabels = 2,
|
||||||
|
eFourLabels = 3,
|
||||||
|
eFiveLabels = 4,
|
||||||
|
eSixLabels = 5,
|
||||||
|
eSevenLabels = 6,
|
||||||
|
eEightLabels = 7,
|
||||||
|
eNineLabels = 8,
|
||||||
|
eTenLabels = 9,
|
||||||
|
e__Other__,
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::Labeled<impl::BooleanMetric, LabeledBooleanMetricLabelsLabel> labeled_boolean_metric_labels(30);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.labeled_counter_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::Labeled<impl::CounterMetric, DynamicLabel> labeled_counter_metric(31);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.labeled_counter_metric_labels
|
||||||
|
*/
|
||||||
|
enum class LabeledCounterMetricLabelsLabel: uint16_t {
|
||||||
|
eOneLabel = 0,
|
||||||
|
eTwoLabels = 1,
|
||||||
|
e__Other__,
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::Labeled<impl::CounterMetric, LabeledCounterMetricLabelsLabel> labeled_counter_metric_labels(32);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.labeled_string_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::Labeled<impl::StringMetric, DynamicLabel> labeled_string_metric(33);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.labeled_string_metric_labels
|
||||||
|
*/
|
||||||
|
enum class LabeledStringMetricLabelsLabel: uint16_t {
|
||||||
|
eOneLabel = 0,
|
||||||
|
eTwoLabels = 1,
|
||||||
|
e__Other__,
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::Labeled<impl::StringMetric, LabeledStringMetricLabelsLabel> labeled_string_metric_labels(34);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.memory_distribution_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::MemoryDistributionMetric memory_distribution_metric(35);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.string_list_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::StringListMetric string_list_metric(36);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.string_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::StringMetric string_metric(37);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.text_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::TextMetric text_metric(38);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.timespan_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::TimespanMetric timespan_metric(39);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.timing_distribution_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::TimingDistributionMetric timing_distribution_metric(40);
|
||||||
|
|
||||||
|
}
|
||||||
|
namespace test2_nested {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.nested.datetime_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::DatetimeMetric datetime_metric(42);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.nested.event_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::EventMetric<NoExtraKeys> event_metric(43);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.nested.event_metric_with_extra
|
||||||
|
*/
|
||||||
|
struct EventMetricWithExtraExtra {
|
||||||
|
mozilla::Maybe<nsCString> anExtraKey;
|
||||||
|
mozilla::Maybe<nsCString> anotherExtraKey;
|
||||||
|
|
||||||
|
std::tuple<nsTArray<nsCString>, nsTArray<nsCString>> ToFfiExtra() const {
|
||||||
|
nsTArray<nsCString> extraKeys;
|
||||||
|
nsTArray<nsCString> extraValues;
|
||||||
|
if (anExtraKey) {
|
||||||
|
extraKeys.AppendElement()->AssignASCII("an_extra_key");
|
||||||
|
extraValues.EmplaceBack(anExtraKey.value());
|
||||||
|
}
|
||||||
|
if (anotherExtraKey) {
|
||||||
|
extraKeys.AppendElement()->AssignASCII("another_extra_key");
|
||||||
|
extraValues.EmplaceBack(anotherExtraKey.value());
|
||||||
|
}
|
||||||
|
return std::make_tuple(std::move(extraKeys), std::move(extraValues));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::EventMetric<EventMetricWithExtraExtra> event_metric_with_extra(44);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.nested.external_denominator
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::CounterMetric external_denominator(45);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.nested.optimizable_counter_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::CounterMetric optimizable_counter_metric(46);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.nested.quantity_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::QuantityMetric quantity_metric(47);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.nested.rate_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::RateMetric rate_metric(48);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.nested.rate_with_external_denominator
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::NumeratorMetric rate_with_external_denominator(49);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* generated from test2.nested.uuid_metric
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* A multi-line
|
||||||
|
* description
|
||||||
|
*/
|
||||||
|
constexpr impl::UuidMetric uuid_metric(50);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace mozilla::glean
|
} // namespace mozilla::glean
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ using metric_entry_t = uint64_t;
|
||||||
|
|
||||||
static_assert(GLEAN_INDEX_BITS + GLEAN_TYPE_BITS + GLEAN_ID_BITS == sizeof(metric_entry_t) * 8, "Index, Type, and ID bits need to fit into a metric_entry_t");
|
static_assert(GLEAN_INDEX_BITS + GLEAN_TYPE_BITS + GLEAN_ID_BITS == sizeof(metric_entry_t) * 8, "Index, Type, and ID bits need to fit into a metric_entry_t");
|
||||||
static_assert(GLEAN_TYPE_BITS + GLEAN_ID_BITS <= sizeof(uint32_t) * 8, "Metric Types and IDs need to fit into at most 32 bits");
|
static_assert(GLEAN_TYPE_BITS + GLEAN_ID_BITS <= sizeof(uint32_t) * 8, "Metric Types and IDs need to fit into at most 32 bits");
|
||||||
static_assert(2 < UINT32_MAX, "Too many metric categories generated.");
|
static_assert(4 < UINT32_MAX, "Too many metric categories generated.");
|
||||||
static_assert(25 < 33554432, "Too many metrics generated. Need room for 2 signal bits.");
|
static_assert(50 < 33554432, "Too many metrics generated. Need room for 2 signal bits.");
|
||||||
static_assert(20 < 32, "Too many different metric types.");
|
static_assert(20 < 32, "Too many different metric types.");
|
||||||
|
|
||||||
already_AddRefed<GleanMetric> NewMetricFromId(uint32_t id, nsISupports* aParent) {
|
already_AddRefed<GleanMetric> NewMetricFromId(uint32_t id, nsISupports* aParent) {
|
||||||
|
|
@ -182,6 +182,8 @@ constexpr char gCategoryStringTable[] = {
|
||||||
#endif
|
#endif
|
||||||
/* 0 - "test" */ 't', 'e', 's', 't', '\0',
|
/* 0 - "test" */ 't', 'e', 's', 't', '\0',
|
||||||
/* 5 - "testNested" */ 't', 'e', 's', 't', 'N', 'e', 's', 't', 'e', 'd', '\0',
|
/* 5 - "testNested" */ 't', 'e', 's', 't', 'N', 'e', 's', 't', 'e', 'd', '\0',
|
||||||
|
/* 16 - "test2" */ 't', 'e', 's', 't', '2', '\0',
|
||||||
|
/* 22 - "test2Nested" */ 't', 'e', 's', 't', '2', 'N', 'e', 's', 't', 'e', 'd', '\0',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -189,6 +191,8 @@ static_assert(sizeof(gCategoryStringTable) < UINT32_MAX, "Category string table
|
||||||
|
|
||||||
const category_entry_t sCategoryByNameLookupEntries[] = {
|
const category_entry_t sCategoryByNameLookupEntries[] = {
|
||||||
5ul,
|
5ul,
|
||||||
|
16ul,
|
||||||
|
22ul,
|
||||||
0ul
|
0ul
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -215,14 +219,7 @@ CategoryByNameLookup(const nsACString& aKey)
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 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r char gMetricStringTable[] = {
|
||||||
/* 570 - "testNested.rateMetric" */ 't', 'e', 's', 't', 'N', 'e', 's', 't', 'e', 'd', '.', 'r', 'a', 't', 'e', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
/* 570 - "testNested.rateMetric" */ 't', 'e', 's', 't', 'N', 'e', 's', 't', 'e', 'd', '.', 'r', 'a', 't', 'e', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
/* 592 - "testNested.rateWithExternalDenominator" */ 't', 'e', 's', 't', 'N', 'e', 's', 't', 'e', 'd', '.', 'r', 'a', 't', 'e', 'W', 'i', 't', 'h', 'E', 'x', 't', 'e', 'r', 'n', 'a', 'l', 'D', 'e', 'n', 'o', 'm', 'i', 'n', 'a', 't', 'o', 'r', '\0',
|
/* 592 - "testNested.rateWithExternalDenominator" */ 't', 'e', 's', 't', 'N', 'e', 's', 't', 'e', 'd', '.', 'r', 'a', 't', 'e', 'W', 'i', 't', 'h', 'E', 'x', 't', 'e', 'r', 'n', 'a', 'l', 'D', 'e', 'n', 'o', 'm', 'i', 'n', 'a', 't', 'o', 'r', '\0',
|
||||||
/* 631 - "testNested.uuidMetric" */ 't', 'e', 's', 't', 'N', 'e', 's', 't', 'e', 'd', '.', 'u', 'u', 'i', 'd', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
/* 631 - "testNested.uuidMetric" */ 't', 'e', 's', 't', 'N', 'e', 's', 't', 'e', 'd', '.', 'u', 'u', 'i', 'd', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 653 - "test2.booleanMetric" */ 't', 'e', 's', 't', '2', '.', 'b', 'o', 'o', 'l', 'e', 'a', 'n', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 673 - "test2.counterMetric" */ 't', 'e', 's', 't', '2', '.', 'c', 'o', 'u', 'n', 't', 'e', 'r', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 693 - "test2.customDistributionMetric" */ 't', 'e', 's', 't', '2', '.', 'c', 'u', 's', 't', 'o', 'm', 'D', 'i', 's', 't', 'r', 'i', 'b', 'u', 't', 'i', 'o', 'n', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 724 - "test2.labeledBooleanMetric" */ 't', 'e', 's', 't', '2', '.', 'l', 'a', 'b', 'e', 'l', 'e', 'd', 'B', 'o', 'o', 'l', 'e', 'a', 'n', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 751 - "test2.labeledBooleanMetricLabels" */ 't', 'e', 's', 't', '2', '.', 'l', 'a', 'b', 'e', 'l', 'e', 'd', 'B', 'o', 'o', 'l', 'e', 'a', 'n', 'M', 'e', 't', 'r', 'i', 'c', 'L', 'a', 'b', 'e', 'l', 's', '\0',
|
||||||
|
/* 784 - "test2.labeledCounterMetric" */ 't', 'e', 's', 't', '2', '.', 'l', 'a', 'b', 'e', 'l', 'e', 'd', 'C', 'o', 'u', 'n', 't', 'e', 'r', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 811 - "test2.labeledCounterMetricLabels" */ 't', 'e', 's', 't', '2', '.', 'l', 'a', 'b', 'e', 'l', 'e', 'd', 'C', 'o', 'u', 'n', 't', 'e', 'r', 'M', 'e', 't', 'r', 'i', 'c', 'L', 'a', 'b', 'e', 'l', 's', '\0',
|
||||||
|
/* 844 - "test2.labeledStringMetric" */ 't', 'e', 's', 't', '2', '.', 'l', 'a', 'b', 'e', 'l', 'e', 'd', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 870 - "test2.labeledStringMetricLabels" */ 't', 'e', 's', 't', '2', '.', 'l', 'a', 'b', 'e', 'l', 'e', 'd', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'e', 't', 'r', 'i', 'c', 'L', 'a', 'b', 'e', 'l', 's', '\0',
|
||||||
|
/* 902 - "test2.memoryDistributionMetric" */ 't', 'e', 's', 't', '2', '.', 'm', 'e', 'm', 'o', 'r', 'y', 'D', 'i', 's', 't', 'r', 'i', 'b', 'u', 't', 'i', 'o', 'n', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 933 - "test2.stringListMetric" */ 't', 'e', 's', 't', '2', '.', 's', 't', 'r', 'i', 'n', 'g', 'L', 'i', 's', 't', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 956 - "test2.stringMetric" */ 't', 'e', 's', 't', '2', '.', 's', 't', 'r', 'i', 'n', 'g', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 975 - "test2.textMetric" */ 't', 'e', 's', 't', '2', '.', 't', 'e', 'x', 't', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 992 - "test2.timespanMetric" */ 't', 'e', 's', 't', '2', '.', 't', 'i', 'm', 'e', 's', 'p', 'a', 'n', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 1013 - "test2.timingDistributionMetric" */ 't', 'e', 's', 't', '2', '.', 't', 'i', 'm', 'i', 'n', 'g', 'D', 'i', 's', 't', 'r', 'i', 'b', 'u', 't', 'i', 'o', 'n', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 1044 - "test2Nested.anObject" */ 't', 'e', 's', 't', '2', 'N', 'e', 's', 't', 'e', 'd', '.', 'a', 'n', 'O', 'b', 'j', 'e', 'c', 't', '\0',
|
||||||
|
/* 1065 - "test2Nested.datetimeMetric" */ 't', 'e', 's', 't', '2', 'N', 'e', 's', 't', 'e', 'd', '.', 'd', 'a', 't', 'e', 't', 'i', 'm', 'e', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 1092 - "test2Nested.eventMetric" */ 't', 'e', 's', 't', '2', 'N', 'e', 's', 't', 'e', 'd', '.', 'e', 'v', 'e', 'n', 't', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 1116 - "test2Nested.eventMetricWithExtra" */ 't', 'e', 's', 't', '2', 'N', 'e', 's', 't', 'e', 'd', '.', 'e', 'v', 'e', 'n', 't', 'M', 'e', 't', 'r', 'i', 'c', 'W', 'i', 't', 'h', 'E', 'x', 't', 'r', 'a', '\0',
|
||||||
|
/* 1149 - "test2Nested.externalDenominator" */ 't', 'e', 's', 't', '2', 'N', 'e', 's', 't', 'e', 'd', '.', 'e', 'x', 't', 'e', 'r', 'n', 'a', 'l', 'D', 'e', 'n', 'o', 'm', 'i', 'n', 'a', 't', 'o', 'r', '\0',
|
||||||
|
/* 1181 - "test2Nested.optimizableCounterMetric" */ 't', 'e', 's', 't', '2', 'N', 'e', 's', 't', 'e', 'd', '.', 'o', 'p', 't', 'i', 'm', 'i', 'z', 'a', 'b', 'l', 'e', 'C', 'o', 'u', 'n', 't', 'e', 'r', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 1218 - "test2Nested.quantityMetric" */ 't', 'e', 's', 't', '2', 'N', 'e', 's', 't', 'e', 'd', '.', 'q', 'u', 'a', 'n', 't', 'i', 't', 'y', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 1245 - "test2Nested.rateMetric" */ 't', 'e', 's', 't', '2', 'N', 'e', 's', 't', 'e', 'd', '.', 'r', 'a', 't', 'e', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
|
/* 1268 - "test2Nested.rateWithExternalDenominator" */ 't', 'e', 's', 't', '2', 'N', 'e', 's', 't', 'e', 'd', '.', 'r', 'a', 't', 'e', 'W', 'i', 't', 'h', 'E', 'x', 't', 'e', 'r', 'n', 'a', 'l', 'D', 'e', 'n', 'o', 'm', 'i', 'n', 'a', 't', 'o', 'r', '\0',
|
||||||
|
/* 1308 - "test2Nested.uuidMetric" */ 't', 'e', 's', 't', '2', 'N', 'e', 's', 't', 'e', 'd', '.', 'u', 'u', 'i', 'd', 'M', 'e', 't', 'r', 'i', 'c', '\0',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static_assert(sizeof(gMetricStringTable) < 4294967296, "Metric string table is too large.");
|
static_assert(sizeof(gMetricStringTable) < 4294967296, "Metric string table is too large.");
|
||||||
|
|
||||||
const metric_entry_t sMetricByNameLookupEntries[] = {
|
const metric_entry_t sMetricByNameLookupEntries[] = {
|
||||||
5764607578868810038ull,
|
2882303894661104400ull,
|
||||||
|
2882303898956071723ull,
|
||||||
1152921513196781587ull,
|
1152921513196781587ull,
|
||||||
1729382269795172390ull,
|
1729382377169355445ull,
|
||||||
3458764552475246801ull,
|
10952754504218445044ull,
|
||||||
10952754396844261968ull,
|
|
||||||
4611686065672028430ull,
|
4611686065672028430ull,
|
||||||
|
1152921702175343773ull,
|
||||||
|
11529215260816835868ull,
|
||||||
|
2305843133767746260ull,
|
||||||
|
1152921620570964641ull,
|
||||||
|
2882303787286921342ull,
|
||||||
2305843026393563204ull,
|
2305843026393563204ull,
|
||||||
1152921594801160700ull,
|
4611686173046211493ull,
|
||||||
|
9799832883647480352ull,
|
||||||
|
2882303791581888664ull,
|
||||||
|
3458764659849429862ull,
|
||||||
|
5764607578868810038ull,
|
||||||
|
9223372122754122205ull,
|
||||||
|
10376293640245871162ull,
|
||||||
|
10376293747620054237ull,
|
||||||
|
3458764655554462540ull,
|
||||||
|
576460756598390784ull,
|
||||||
|
7493989848663982456ull,
|
||||||
|
1152921697880376445ull,
|
||||||
5188146822270419236ull,
|
5188146822270419236ull,
|
||||||
3458764548180279480ull,
|
8070450712636556329ull,
|
||||||
|
7493989956038165524ull,
|
||||||
|
1729382269795172390ull,
|
||||||
|
5188146929644602300ull,
|
||||||
|
8646911469234947140ull,
|
||||||
|
2305843138062713583ull,
|
||||||
|
576460863972573837ull,
|
||||||
|
6341068335467200838ull,
|
||||||
|
1152921594801160700ull,
|
||||||
|
6341068442841383904ull,
|
||||||
8646911361860764070ull,
|
8646911361860764070ull,
|
||||||
8646911366155731389ull,
|
8646911366155731389ull,
|
||||||
8070450605262373260ull,
|
8070450605262373260ull,
|
||||||
9799832883647480352ull,
|
3458764552475246801ull,
|
||||||
11529215153442652791ull,
|
11529215153442652791ull,
|
||||||
2305843030688530526ull,
|
2305843030688530526ull,
|
||||||
6917529092065591642ull,
|
6917529092065591642ull,
|
||||||
9223372122754122205ull,
|
4035225416447820678ull,
|
||||||
10376293640245871162ull,
|
|
||||||
4035225309073637616ull,
|
4035225309073637616ull,
|
||||||
2882303787286921342ull,
|
8646911473529914460ull,
|
||||||
576460756598390784ull,
|
6917529199439774709ull,
|
||||||
7493989848663982456ull,
|
3458764548180279480ull,
|
||||||
2882303791581888664ull,
|
9799832991021663426ull,
|
||||||
6341068335467200838ull
|
5764607686242993103ull,
|
||||||
|
10952754396844261968ull
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -344,23 +398,23 @@ MetricByNameLookup(const nsACString& aKey)
|
||||||
static const uint8_t BASES[] = {
|
static const uint8_t BASES[] = {
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
|
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
|
||||||
|
1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,8 @@ Maybe<uint32_t> MetricByNameLookup(const nsACString&);
|
||||||
*/
|
*/
|
||||||
Maybe<uint32_t> CategoryByNameLookup(const nsACString&);
|
Maybe<uint32_t> CategoryByNameLookup(const nsACString&);
|
||||||
|
|
||||||
extern const category_entry_t sCategoryByNameLookupEntries[2];
|
extern const category_entry_t sCategoryByNameLookupEntries[4];
|
||||||
extern const metric_entry_t sMetricByNameLookupEntries[25];
|
extern const metric_entry_t sMetricByNameLookupEntries[50];
|
||||||
|
|
||||||
} // namespace mozilla::glean
|
} // namespace mozilla::glean
|
||||||
#endif // mozilla_GleanJSMetricsLookup_h
|
#endif // mozilla_GleanJSMetricsLookup_h
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ def test_gifft_codegen():
|
||||||
byte-for-byte with expected output C++ files.
|
byte-for-byte with expected output C++ files.
|
||||||
To generate new expected output files, set `UPDATE_EXPECT=1` when running the test suite:
|
To generate new expected output files, set `UPDATE_EXPECT=1` when running the test suite:
|
||||||
|
|
||||||
UPDATE_EXPECT=1 mach test toolkit/components/glean/pytest
|
UPDATE_EXPECT=1 mach test toolkit/components/glean/tests/pytest
|
||||||
"""
|
"""
|
||||||
|
|
||||||
options = {"allow_reserved": False}
|
options = {"allow_reserved": False}
|
||||||
|
|
|
||||||
|
|
@ -26,11 +26,19 @@ def test_all_metric_types():
|
||||||
Expect it to be fragile.
|
Expect it to be fragile.
|
||||||
To generate new expected output files, set `UPDATE_EXPECT=1` when running the test suite:
|
To generate new expected output files, set `UPDATE_EXPECT=1` when running the test suite:
|
||||||
|
|
||||||
UPDATE_EXPECT=1 mach test toolkit/components/glean/pytest
|
UPDATE_EXPECT=1 mach test toolkit/components/glean/tests/pytest
|
||||||
"""
|
"""
|
||||||
|
|
||||||
options = {"allow_reserved": False}
|
options = {"allow_reserved": False}
|
||||||
input_files = [Path(path.join(path.dirname(__file__), "metrics_test.yaml"))]
|
input_files = [
|
||||||
|
Path(path.join(path.dirname(__file__), x))
|
||||||
|
for x in ["metrics_test.yaml", "metrics2_test.yaml"]
|
||||||
|
]
|
||||||
|
|
||||||
|
interesting = [
|
||||||
|
Path(path.join(path.dirname(__file__), x)) for x in ["metrics_test.yaml"]
|
||||||
|
]
|
||||||
|
options.update({"interesting": interesting})
|
||||||
|
|
||||||
all_objs, options = run_glean_parser.parse_with_options(input_files, options)
|
all_objs, options = run_glean_parser.parse_with_options(input_files, options)
|
||||||
|
|
||||||
|
|
@ -50,7 +58,7 @@ def test_fake_pings():
|
||||||
Expect it to be fragile.
|
Expect it to be fragile.
|
||||||
To generate new expected output files, set `UPDATE_EXPECT=1` when running the test suite:
|
To generate new expected output files, set `UPDATE_EXPECT=1` when running the test suite:
|
||||||
|
|
||||||
UPDATE_EXPECT=1 mach test toolkit/components/glean/pytest
|
UPDATE_EXPECT=1 mach test toolkit/components/glean/tests/pytest
|
||||||
"""
|
"""
|
||||||
|
|
||||||
options = {"allow_reserved": False}
|
options = {"allow_reserved": False}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,15 @@ def test_all_metric_types():
|
||||||
"""
|
"""
|
||||||
|
|
||||||
options = {"allow_reserved": False}
|
options = {"allow_reserved": False}
|
||||||
input_files = [Path(path.join(path.dirname(__file__), "metrics_test.yaml"))]
|
input_files = [
|
||||||
|
Path(path.join(path.dirname(__file__), x))
|
||||||
|
for x in ["metrics_test.yaml", "metrics2_test.yaml"]
|
||||||
|
]
|
||||||
|
|
||||||
|
interesting = [
|
||||||
|
Path(path.join(path.dirname(__file__), x)) for x in ["metrics_test.yaml"]
|
||||||
|
]
|
||||||
|
options.update({"interesting": interesting})
|
||||||
|
|
||||||
all_objs, options = run_glean_parser.parse_with_options(input_files, options)
|
all_objs, options = run_glean_parser.parse_with_options(input_files, options)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,11 +30,19 @@ def test_all_metric_types():
|
||||||
Expect it to be fragile.
|
Expect it to be fragile.
|
||||||
To generate new expected output files, set `UPDATE_EXPECT=1` when running the test suite:
|
To generate new expected output files, set `UPDATE_EXPECT=1` when running the test suite:
|
||||||
|
|
||||||
UPDATE_EXPECT=1 mach test toolkit/components/glean/pytest
|
UPDATE_EXPECT=1 mach test toolkit/components/glean/tests/pytest
|
||||||
"""
|
"""
|
||||||
|
|
||||||
options = {"allow_reserved": False}
|
options = {"allow_reserved": False}
|
||||||
input_files = [Path(path.join(path.dirname(__file__), "metrics_test.yaml"))]
|
input_files = [
|
||||||
|
Path(path.join(path.dirname(__file__), x))
|
||||||
|
for x in ["metrics_test.yaml", "metrics2_test.yaml"]
|
||||||
|
]
|
||||||
|
|
||||||
|
interesting = [
|
||||||
|
Path(path.join(path.dirname(__file__), x)) for x in ["metrics_test.yaml"]
|
||||||
|
]
|
||||||
|
options.update({"interesting": interesting})
|
||||||
|
|
||||||
all_objs, options = run_glean_parser.parse_with_options(input_files, options)
|
all_objs, options = run_glean_parser.parse_with_options(input_files, options)
|
||||||
|
|
||||||
|
|
@ -53,7 +61,7 @@ def test_fake_pings():
|
||||||
Expect it to be fragile.
|
Expect it to be fragile.
|
||||||
To generate new expected output files, set `UPDATE_EXPECT=1` when running the test suite:
|
To generate new expected output files, set `UPDATE_EXPECT=1` when running the test suite:
|
||||||
|
|
||||||
UPDATE_EXPECT=1 mach test toolkit/components/glean/pytest
|
UPDATE_EXPECT=1 mach test toolkit/components/glean/tests/pytest
|
||||||
"""
|
"""
|
||||||
|
|
||||||
options = {"allow_reserved": False}
|
options = {"allow_reserved": False}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ def test_jogfile_output():
|
||||||
|
|
||||||
To generate new expected output files, set `UPDATE_EXPECT=1` when running the test suite:
|
To generate new expected output files, set `UPDATE_EXPECT=1` when running the test suite:
|
||||||
|
|
||||||
UPDATE_EXPECT=1 mach test toolkit/components/glean/pytest
|
UPDATE_EXPECT=1 mach test toolkit/components/glean/tests/pytest
|
||||||
"""
|
"""
|
||||||
|
|
||||||
options = {"allow_reserved": False}
|
options = {"allow_reserved": False}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue