forked from mirrors/gecko-dev
Bug 1884881 - Update Glean to v58.1.0. r=perry.mcmanis,supply-chain-reviewers,mach-reviewers
Depends on D204347 Differential Revision: https://phabricator.services.mozilla.com/D204348
This commit is contained in:
parent
02a2eb66b1
commit
56cf6c0d03
28 changed files with 186 additions and 108 deletions
8
Cargo.lock
generated
8
Cargo.lock
generated
|
|
@ -2307,9 +2307,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "glean"
|
||||
version = "58.0.0"
|
||||
version = "58.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "31529f2862321e3ddaed47293c79c6e8c7b6dc42366e345a36fd826fe6a8b48d"
|
||||
checksum = "f58388f10d013e2d12bb58e6e76983ede120789956fe827913a3d2560c66d44d"
|
||||
dependencies = [
|
||||
"glean-core",
|
||||
"inherent",
|
||||
|
|
@ -2320,9 +2320,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "glean-core"
|
||||
version = "58.0.0"
|
||||
version = "58.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb88e7f8101f40dac34c05e3045b4e1e2a22abe6d6745dfcf61b8d0f1ebf63df"
|
||||
checksum = "ed9acc46fd38c5c995a0537e76364496addace660839dc279079e5957e3c1093"
|
||||
dependencies = [
|
||||
"android_logger",
|
||||
"bincode",
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ allprojects {
|
|||
topsrcdir = gradle.mozconfig.topsrcdir
|
||||
topobjdir = gradle.mozconfig.topobjdir
|
||||
|
||||
gleanVersion = "58.0.0"
|
||||
gleanVersion = "58.1.0"
|
||||
if (gleanVersion != getRustVersionFor("glean")) {
|
||||
throw new StopExecutionException("Mismatched Glean version, expected: ${gleanVersion}," +
|
||||
" found ${getRustVersionFor("glean")}")
|
||||
|
|
|
|||
8
gfx/wr/Cargo.lock
generated
8
gfx/wr/Cargo.lock
generated
|
|
@ -996,9 +996,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "glean"
|
||||
version = "58.0.0"
|
||||
version = "58.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "31529f2862321e3ddaed47293c79c6e8c7b6dc42366e345a36fd826fe6a8b48d"
|
||||
checksum = "f58388f10d013e2d12bb58e6e76983ede120789956fe827913a3d2560c66d44d"
|
||||
dependencies = [
|
||||
"glean-core",
|
||||
"inherent",
|
||||
|
|
@ -1009,9 +1009,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "glean-core"
|
||||
version = "58.0.0"
|
||||
version = "58.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bb88e7f8101f40dac34c05e3045b4e1e2a22abe6d6745dfcf61b8d0f1ebf63df"
|
||||
checksum = "ed9acc46fd38c5c995a0537e76364496addace660839dc279079e5957e3c1093"
|
||||
dependencies = [
|
||||
"android_logger",
|
||||
"bincode",
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ svg_fmt = "0.4"
|
|||
tracy-rs = "0.1.2"
|
||||
derive_more = { version = "0.99", default-features = false, features = ["add_assign"] }
|
||||
etagere = "0.2.6"
|
||||
glean = { version = "58.0.0", optional = true }
|
||||
glean = { version = "58.1.0", optional = true }
|
||||
firefox-on-glean = { version = "0.1.0", optional = true }
|
||||
swgl = { path = "../swgl", optional = true }
|
||||
topological-sort = "0.1"
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ tracy-rs = "0.1.2"
|
|||
log = "0.4"
|
||||
lazy_static = "1"
|
||||
fxhash = "0.2.1"
|
||||
glean = { version = "58.0.0", optional = true }
|
||||
glean = { version = "58.1.0", optional = true }
|
||||
firefox-on-glean = { version = "0.1.0", optional = true }
|
||||
serde = { optional = true, version = "1.0", features = ["serde_derive"] }
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ vendored:third_party/python/wheel
|
|||
vendored:third_party/python/zipp
|
||||
# glean-sdk may not be installable if a wheel isn't available
|
||||
# and it has to be built from source.
|
||||
pypi-optional:glean-sdk==58.0.0:telemetry will not be collected
|
||||
pypi-optional:glean-sdk==58.1.0:telemetry will not be collected
|
||||
# Mach gracefully handles the case where `psutil` is unavailable.
|
||||
# We aren't (yet) able to pin packages in automation, so we have to
|
||||
# support down to the oldest locally-installed version (5.4.2).
|
||||
|
|
|
|||
|
|
@ -598,10 +598,6 @@ criteria = "safe-to-run"
|
|||
version = "0.15.0"
|
||||
criteria = "safe-to-deploy"
|
||||
|
||||
[[exemptions.nom]]
|
||||
version = "7.1.1"
|
||||
criteria = "safe-to-deploy"
|
||||
|
||||
[[exemptions.objc]]
|
||||
version = "0.2.7"
|
||||
criteria = "safe-to-deploy"
|
||||
|
|
@ -754,14 +750,6 @@ criteria = "safe-to-deploy"
|
|||
version = "1.2.0"
|
||||
criteria = "safe-to-deploy"
|
||||
|
||||
[[exemptions.static_assertions]]
|
||||
version = "1.1.0"
|
||||
criteria = "safe-to-deploy"
|
||||
|
||||
[[exemptions.strsim]]
|
||||
version = "0.10.0"
|
||||
criteria = "safe-to-deploy"
|
||||
|
||||
[[exemptions.tempfile]]
|
||||
version = "3.3.0"
|
||||
criteria = "safe-to-deploy"
|
||||
|
|
|
|||
|
|
@ -219,26 +219,19 @@ user-login = "jrmuizel"
|
|||
user-name = "Jeff Muizelaar"
|
||||
|
||||
[[publisher.glean]]
|
||||
version = "58.0.0"
|
||||
when = "2024-02-29"
|
||||
version = "58.1.0"
|
||||
when = "2024-03-12"
|
||||
user-id = 48
|
||||
user-login = "badboy"
|
||||
user-name = "Jan-Erik Rediger"
|
||||
|
||||
[[publisher.glean-core]]
|
||||
version = "58.0.0"
|
||||
when = "2024-02-29"
|
||||
version = "58.1.0"
|
||||
when = "2024-03-12"
|
||||
user-id = 48
|
||||
user-login = "badboy"
|
||||
user-name = "Jan-Erik Rediger"
|
||||
|
||||
[[publisher.glslopt]]
|
||||
version = "0.1.9"
|
||||
when = "2021-03-17"
|
||||
user-id = 84794
|
||||
user-login = "jamienicol"
|
||||
user-name = "Jamie Nicol"
|
||||
|
||||
[[publisher.glslopt]]
|
||||
version = "0.1.10"
|
||||
when = "2024-02-13"
|
||||
|
|
@ -482,13 +475,6 @@ user-id = 2915
|
|||
user-login = "Amanieu"
|
||||
user-name = "Amanieu d'Antras"
|
||||
|
||||
[[publisher.serde]]
|
||||
version = "1.0.195"
|
||||
when = "2024-01-06"
|
||||
user-id = 3618
|
||||
user-login = "dtolnay"
|
||||
user-name = "David Tolnay"
|
||||
|
||||
[[publisher.serde]]
|
||||
version = "1.0.197"
|
||||
when = "2024-02-20"
|
||||
|
|
@ -503,13 +489,6 @@ user-id = 3618
|
|||
user-login = "dtolnay"
|
||||
user-name = "David Tolnay"
|
||||
|
||||
[[publisher.serde_derive]]
|
||||
version = "1.0.195"
|
||||
when = "2024-01-06"
|
||||
user-id = 3618
|
||||
user-login = "dtolnay"
|
||||
user-name = "David Tolnay"
|
||||
|
||||
[[publisher.serde_derive]]
|
||||
version = "1.0.197"
|
||||
when = "2024-02-20"
|
||||
|
|
@ -538,13 +517,6 @@ user-id = 3618
|
|||
user-login = "dtolnay"
|
||||
user-name = "David Tolnay"
|
||||
|
||||
[[publisher.smallvec]]
|
||||
version = "1.11.1"
|
||||
when = "2023-09-20"
|
||||
user-id = 2017
|
||||
user-login = "mbrubeck"
|
||||
user-name = "Matt Brubeck"
|
||||
|
||||
[[publisher.smallvec]]
|
||||
version = "1.13.1"
|
||||
when = "2024-01-19"
|
||||
|
|
@ -566,13 +538,6 @@ user-id = 189
|
|||
user-login = "BurntSushi"
|
||||
user-name = "Andrew Gallant"
|
||||
|
||||
[[publisher.thiserror]]
|
||||
version = "1.0.56"
|
||||
when = "2024-01-02"
|
||||
user-id = 3618
|
||||
user-login = "dtolnay"
|
||||
user-name = "David Tolnay"
|
||||
|
||||
[[publisher.thiserror]]
|
||||
version = "1.0.57"
|
||||
when = "2024-02-11"
|
||||
|
|
@ -580,13 +545,6 @@ user-id = 3618
|
|||
user-login = "dtolnay"
|
||||
user-name = "David Tolnay"
|
||||
|
||||
[[publisher.thiserror-impl]]
|
||||
version = "1.0.56"
|
||||
when = "2024-01-02"
|
||||
user-id = 3618
|
||||
user-login = "dtolnay"
|
||||
user-name = "David Tolnay"
|
||||
|
||||
[[publisher.thiserror-impl]]
|
||||
version = "1.0.57"
|
||||
when = "2024-02-11"
|
||||
|
|
@ -895,12 +853,6 @@ criteria = "safe-to-deploy"
|
|||
version = "0.1.2"
|
||||
notes = "no build, no ambient capabilities, no unsafe"
|
||||
|
||||
[[audits.bytecode-alliance.audits.cc]]
|
||||
who = "Alex Crichton <alex@alexcrichton.com>"
|
||||
criteria = "safe-to-deploy"
|
||||
version = "1.0.73"
|
||||
notes = "I am the author of this crate."
|
||||
|
||||
[[audits.bytecode-alliance.audits.cfg-if]]
|
||||
who = "Alex Crichton <alex@alexcrichton.com>"
|
||||
criteria = "safe-to-deploy"
|
||||
|
|
@ -1240,6 +1192,15 @@ criteria = "safe-to-run"
|
|||
version = "0.14.20"
|
||||
aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT"
|
||||
|
||||
[[audits.google.audits.nom]]
|
||||
who = "danakj@chromium.org"
|
||||
criteria = "safe-to-deploy"
|
||||
version = "7.1.3"
|
||||
notes = """
|
||||
Reviewed in https://chromium-review.googlesource.com/c/chromium/src/+/5046153
|
||||
"""
|
||||
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
|
||||
|
||||
[[audits.google.audits.pin-project]]
|
||||
who = "ChromeOS"
|
||||
criteria = "safe-to-run"
|
||||
|
|
@ -1271,6 +1232,34 @@ criteria = "safe-to-run"
|
|||
version = "0.7.1"
|
||||
aggregated-from = "https://chromium.googlesource.com/chromiumos/third_party/rust_crates/+/refs/heads/main/cargo-vet/audits.toml?format=TEXT"
|
||||
|
||||
[[audits.google.audits.static_assertions]]
|
||||
who = "Lukasz Anforowicz <lukasza@chromium.org>"
|
||||
criteria = "safe-to-deploy"
|
||||
version = "1.1.0"
|
||||
notes = """
|
||||
Grepped for `-i cipher`, `-i crypto`, `'\bfs\b'`, `'\bnet\b'`, `'\bunsafe\b'`
|
||||
and there were no hits except for one `unsafe`.
|
||||
|
||||
The lambda where `unsafe` is used is never invoked (e.g. the `unsafe` code
|
||||
never runs) and is only introduced for some compile-time checks. Additional
|
||||
unsafe review comments can be found in https://crrev.com/c/5353376.
|
||||
|
||||
This crate has been added to Chromium in https://crrev.com/c/3736562. The CL
|
||||
description contains a link to a document with an additional security review.
|
||||
"""
|
||||
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
|
||||
|
||||
[[audits.google.audits.strsim]]
|
||||
who = "danakj@chromium.org"
|
||||
criteria = "safe-to-deploy"
|
||||
version = "0.10.0"
|
||||
notes = """
|
||||
Reviewed in https://crrev.com/c/5171063
|
||||
|
||||
Previously reviewed during security review and the audit is grandparented in.
|
||||
"""
|
||||
aggregated-from = "https://chromium.googlesource.com/chromium/src/+/main/third_party/rust/chromium_crates_io/supply-chain/audits.toml?format=TEXT"
|
||||
|
||||
[[audits.google.audits.tokio]]
|
||||
who = "Vovo Yang <vovoy@google.com>"
|
||||
criteria = "safe-to-run"
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
2
third_party/rust/glean-core/Cargo.toml
vendored
2
third_party/rust/glean-core/Cargo.toml
vendored
|
|
@ -13,7 +13,7 @@
|
|||
edition = "2021"
|
||||
rust-version = "1.66"
|
||||
name = "glean-core"
|
||||
version = "58.0.0"
|
||||
version = "58.1.0"
|
||||
authors = [
|
||||
"Jan-Erik Rediger <jrediger@mozilla.com>",
|
||||
"The Glean Team <glean-team@mozilla.com>",
|
||||
|
|
|
|||
4
third_party/rust/glean-core/src/core/mod.rs
vendored
4
third_party/rust/glean-core/src/core/mod.rs
vendored
|
|
@ -118,7 +118,7 @@ where
|
|||
/// trim_data_to_registered_pings: false,
|
||||
/// log_level: None,
|
||||
/// rate_limit: None,
|
||||
/// enable_event_timestamps: false,
|
||||
/// enable_event_timestamps: true,
|
||||
/// experimentation_id: None,
|
||||
/// };
|
||||
/// let mut glean = Glean::new(cfg).unwrap();
|
||||
|
|
@ -318,7 +318,7 @@ impl Glean {
|
|||
trim_data_to_registered_pings: false,
|
||||
log_level: None,
|
||||
rate_limit: None,
|
||||
enable_event_timestamps: false,
|
||||
enable_event_timestamps: true,
|
||||
experimentation_id: None,
|
||||
};
|
||||
|
||||
|
|
|
|||
4
third_party/rust/glean-core/src/glean.udl
vendored
4
third_party/rust/glean-core/src/glean.udl
vendored
|
|
@ -484,6 +484,8 @@ interface TimingDistributionMetric {
|
|||
|
||||
void accumulate_samples(sequence<i64> samples);
|
||||
|
||||
void accumulate_single_sample(i64 sample);
|
||||
|
||||
DistributionData? test_get_value(optional string? ping_name = null);
|
||||
|
||||
i32 test_get_num_recorded_errors(ErrorType error);
|
||||
|
|
@ -527,6 +529,8 @@ interface CustomDistributionMetric {
|
|||
|
||||
void accumulate_samples(sequence<i64> samples);
|
||||
|
||||
void accumulate_single_sample(i64 sample);
|
||||
|
||||
DistributionData? test_get_value(optional string? ping_name = null);
|
||||
|
||||
i32 test_get_num_recorded_errors(ErrorType error);
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ fn experimentation_id_is_set_correctly() {
|
|||
trim_data_to_registered_pings: false,
|
||||
log_level: None,
|
||||
rate_limit: None,
|
||||
enable_event_timestamps: false,
|
||||
enable_event_timestamps: true,
|
||||
experimentation_id: Some(experimentation_id.to_string()),
|
||||
})
|
||||
.unwrap();
|
||||
|
|
|
|||
|
|
@ -84,14 +84,33 @@ impl CustomDistributionMetric {
|
|||
/// for each of them.
|
||||
pub fn accumulate_samples(&self, samples: Vec<i64>) {
|
||||
let metric = self.clone();
|
||||
crate::launch_with_glean(move |glean| metric.accumulate_samples_sync(glean, samples))
|
||||
crate::launch_with_glean(move |glean| metric.accumulate_samples_sync(glean, &samples))
|
||||
}
|
||||
|
||||
/// Accumulates precisely one signed sample and appends it to the metric.
|
||||
///
|
||||
/// Signed is required so that the platform-specific code can provide us with a
|
||||
/// 64 bit signed integer if no `u64` comparable type is available. This
|
||||
/// will take care of filtering and reporting errors.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// - `sample` - The singular sample to be recorded by the metric.
|
||||
///
|
||||
/// ## Notes
|
||||
///
|
||||
/// Discards any negative value of `sample` and reports an
|
||||
/// [`ErrorType::InvalidValue`](crate::ErrorType::InvalidValue).
|
||||
pub fn accumulate_single_sample(&self, sample: i64) {
|
||||
let metric = self.clone();
|
||||
crate::launch_with_glean(move |glean| metric.accumulate_samples_sync(glean, &[sample]))
|
||||
}
|
||||
|
||||
/// Accumulates the provided sample in the metric synchronously.
|
||||
///
|
||||
/// See [`accumulate_samples`](Self::accumulate_samples) for details.
|
||||
#[doc(hidden)]
|
||||
pub fn accumulate_samples_sync(&self, glean: &Glean, samples: Vec<i64>) {
|
||||
pub fn accumulate_samples_sync(&self, glean: &Glean, samples: &[i64]) {
|
||||
if !self.should_record(glean) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -132,7 +151,7 @@ impl CustomDistributionMetric {
|
|||
self.bucket_count as usize,
|
||||
)
|
||||
};
|
||||
accumulate(&samples, hist, Metric::CustomDistributionLinear)
|
||||
accumulate(samples, hist, Metric::CustomDistributionLinear)
|
||||
}
|
||||
HistogramType::Exponential => {
|
||||
let hist = if let Some(Metric::CustomDistributionExponential(hist)) = old_value
|
||||
|
|
@ -145,7 +164,7 @@ impl CustomDistributionMetric {
|
|||
self.bucket_count as usize,
|
||||
)
|
||||
};
|
||||
accumulate(&samples, hist, Metric::CustomDistributionExponential)
|
||||
accumulate(samples, hist, Metric::CustomDistributionExponential)
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -293,7 +293,35 @@ impl TimingDistributionMetric {
|
|||
/// are longer than `MAX_SAMPLE_TIME`.
|
||||
pub fn accumulate_samples(&self, samples: Vec<i64>) {
|
||||
let metric = self.clone();
|
||||
crate::launch_with_glean(move |glean| metric.accumulate_samples_sync(glean, samples))
|
||||
crate::launch_with_glean(move |glean| metric.accumulate_samples_sync(glean, &samples))
|
||||
}
|
||||
|
||||
/// Accumulates precisely one signed sample and appends it to the metric.
|
||||
///
|
||||
/// Precludes the need for a collection in the most common use case.
|
||||
///
|
||||
/// Sign is required so that the platform-specific code can provide us with
|
||||
/// a 64 bit signed integer if no `u64` comparable type is available. This
|
||||
/// will take care of filtering and reporting errors for any provided negative
|
||||
/// sample.
|
||||
///
|
||||
/// Please note that this assumes that the provided sample is already in
|
||||
/// the "unit" declared by the instance of the metric type (e.g. if the
|
||||
/// instance this method was called on is using [`crate::TimeUnit::Second`], then
|
||||
/// `sample` is assumed to be in that unit).
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `sample` - The singular sample to be recorded by the metric.
|
||||
///
|
||||
/// ## Notes
|
||||
///
|
||||
/// Discards any negative value and reports an [`ErrorType::InvalidValue`].
|
||||
/// Reports an [`ErrorType::InvalidOverflow`] error if the sample is longer than
|
||||
/// `MAX_SAMPLE_TIME`.
|
||||
pub fn accumulate_single_sample(&self, sample: i64) {
|
||||
let metric = self.clone();
|
||||
crate::launch_with_glean(move |glean| metric.accumulate_samples_sync(glean, &[sample]))
|
||||
}
|
||||
|
||||
/// **Test-only API (exported for testing purposes).**
|
||||
|
|
@ -301,7 +329,7 @@ impl TimingDistributionMetric {
|
|||
///
|
||||
/// Use [`accumulate_samples`](Self::accumulate_samples)
|
||||
#[doc(hidden)]
|
||||
pub fn accumulate_samples_sync(&self, glean: &Glean, samples: Vec<i64>) {
|
||||
pub fn accumulate_samples_sync(&self, glean: &Glean, samples: &[i64]) {
|
||||
if !self.should_record(glean) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,22 @@ pub trait CustomDistribution {
|
|||
/// them.
|
||||
fn accumulate_samples_signed(&self, samples: Vec<i64>);
|
||||
|
||||
/// Accumulates precisely one signed sample in the metric.
|
||||
///
|
||||
/// This is required so that the platform-specific code can provide us with a
|
||||
/// 64 bit signed integer if no `u64` comparable type is available. This
|
||||
/// will take care of filtering and reporting errors.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// - `sample` - The singular sample to be recorded by the metric.
|
||||
///
|
||||
/// ## Notes
|
||||
///
|
||||
/// Discards any negative value of `sample` and reports an
|
||||
/// [`ErrorType::InvalidValue`](crate::ErrorType::InvalidValue).
|
||||
fn accumulate_single_sample_signed(&self, sample: i64);
|
||||
|
||||
/// **Exported for test purposes.**
|
||||
///
|
||||
/// Gets the currently stored histogram.
|
||||
|
|
|
|||
|
|
@ -66,6 +66,31 @@ pub trait TimingDistribution {
|
|||
/// are longer than `MAX_SAMPLE_TIME`.
|
||||
fn accumulate_samples(&self, samples: Vec<i64>);
|
||||
|
||||
/// Accumulates precisely one signed sample in the metric.
|
||||
///
|
||||
/// Precludes the need for a collection in the most common use case.
|
||||
///
|
||||
/// Sign is required so that the platform-specific code can provide us with
|
||||
/// a 64 bit signed integer if no `u64` comparable type is available. This
|
||||
/// will take care of filtering and reporting errors for any provided negative
|
||||
/// sample.
|
||||
///
|
||||
/// Please note that this assumes that the provided sample is already in
|
||||
/// the "unit" declared by the instance of the metric type (e.g. if the
|
||||
/// instance this method was called on is using [`crate::TimeUnit::Second`], then
|
||||
/// `sample` is assumed to be in that unit).
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * `sample` - The singular sample to be recorded by the metric.
|
||||
///
|
||||
/// ## Notes
|
||||
///
|
||||
/// Discards any negative value and reports an [`ErrorType::InvalidValue`].
|
||||
/// Reports an [`ErrorType::InvalidOverflow`] error if the sample is longer than
|
||||
/// `MAX_SAMPLE_TIME`.
|
||||
fn accumulate_single_sample(&self, sample: i64);
|
||||
|
||||
/// Accumulates the provided samples in the metric.
|
||||
///
|
||||
/// # Arguments
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ mod linear {
|
|||
HistogramType::Linear,
|
||||
);
|
||||
|
||||
metric.accumulate_samples_sync(&glean, vec![50]);
|
||||
metric.accumulate_samples_sync(&glean, &[50]);
|
||||
|
||||
let snapshot = metric
|
||||
.get_value(&glean, "store1")
|
||||
|
|
@ -84,7 +84,7 @@ mod linear {
|
|||
HistogramType::Linear,
|
||||
);
|
||||
|
||||
metric.accumulate_samples_sync(&glean, vec![50]);
|
||||
metric.accumulate_samples_sync(&glean, &[50]);
|
||||
|
||||
for store_name in store_names {
|
||||
let snapshot = StorageManager
|
||||
|
|
@ -126,7 +126,7 @@ mod linear {
|
|||
|
||||
// Accumulate the samples. We intentionally do not report
|
||||
// negative values to not trigger error reporting.
|
||||
metric.accumulate_samples_sync(&glean, [1, 2, 3].to_vec());
|
||||
metric.accumulate_samples_sync(&glean, &[1, 2, 3]);
|
||||
|
||||
let snapshot = metric
|
||||
.get_value(&glean, "store1")
|
||||
|
|
@ -168,7 +168,7 @@ mod linear {
|
|||
);
|
||||
|
||||
// Accumulate the samples.
|
||||
metric.accumulate_samples_sync(&glean, [-1, 1, 2, 3].to_vec());
|
||||
metric.accumulate_samples_sync(&glean, &[-1, 1, 2, 3]);
|
||||
|
||||
let snapshot = metric
|
||||
.get_value(&glean, "store1")
|
||||
|
|
@ -209,7 +209,7 @@ mod linear {
|
|||
HistogramType::Linear,
|
||||
);
|
||||
|
||||
metric.accumulate_samples_sync(&glean, vec![50]);
|
||||
metric.accumulate_samples_sync(&glean, &[50]);
|
||||
|
||||
let snapshot = metric.get_value(&glean, "store1");
|
||||
assert!(snapshot.is_some());
|
||||
|
|
@ -242,7 +242,7 @@ mod exponential {
|
|||
HistogramType::Exponential,
|
||||
);
|
||||
|
||||
metric.accumulate_samples_sync(&glean, vec![50]);
|
||||
metric.accumulate_samples_sync(&glean, &[50]);
|
||||
|
||||
let snapshot = metric
|
||||
.get_value(&glean, "store1")
|
||||
|
|
@ -286,7 +286,7 @@ mod exponential {
|
|||
HistogramType::Exponential,
|
||||
);
|
||||
|
||||
metric.accumulate_samples_sync(&glean, vec![50]);
|
||||
metric.accumulate_samples_sync(&glean, &[50]);
|
||||
|
||||
for store_name in store_names {
|
||||
let snapshot = StorageManager
|
||||
|
|
@ -328,7 +328,7 @@ mod exponential {
|
|||
|
||||
// Accumulate the samples. We intentionally do not report
|
||||
// negative values to not trigger error reporting.
|
||||
metric.accumulate_samples_sync(&glean, [1, 2, 3].to_vec());
|
||||
metric.accumulate_samples_sync(&glean, &[1, 2, 3]);
|
||||
|
||||
let snapshot = metric
|
||||
.get_value(&glean, "store1")
|
||||
|
|
@ -370,7 +370,7 @@ mod exponential {
|
|||
);
|
||||
|
||||
// Accumulate the samples.
|
||||
metric.accumulate_samples_sync(&glean, [-1, 1, 2, 3].to_vec());
|
||||
metric.accumulate_samples_sync(&glean, &[-1, 1, 2, 3]);
|
||||
|
||||
let snapshot = metric
|
||||
.get_value(&glean, "store1")
|
||||
|
|
@ -411,7 +411,7 @@ mod exponential {
|
|||
HistogramType::Exponential,
|
||||
);
|
||||
|
||||
metric.accumulate_samples_sync(&glean, vec![50]);
|
||||
metric.accumulate_samples_sync(&glean, &[50]);
|
||||
|
||||
let snapshot = metric.get_value(&glean, "store1");
|
||||
assert!(snapshot.is_some());
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ fn test_metrics_must_report_experimentation_id() {
|
|||
trim_data_to_registered_pings: false,
|
||||
log_level: None,
|
||||
rate_limit: None,
|
||||
enable_event_timestamps: false,
|
||||
enable_event_timestamps: true,
|
||||
experimentation_id: Some("test-experimentation-id".to_string()),
|
||||
})
|
||||
.unwrap();
|
||||
|
|
@ -141,7 +141,7 @@ fn experimentation_id_is_removed_if_send_if_empty_is_false() {
|
|||
trim_data_to_registered_pings: false,
|
||||
log_level: None,
|
||||
rate_limit: None,
|
||||
enable_event_timestamps: false,
|
||||
enable_event_timestamps: true,
|
||||
experimentation_id: Some("test-experimentation-id".to_string()),
|
||||
})
|
||||
.unwrap();
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ fn the_accumulate_samples_api_correctly_stores_timing_values() {
|
|||
|
||||
// Accumulate the samples. We intentionally do not report
|
||||
// negative values to not trigger error reporting.
|
||||
metric.accumulate_samples_sync(&glean, [1, 2, 3].to_vec());
|
||||
metric.accumulate_samples_sync(&glean, &[1, 2, 3]);
|
||||
|
||||
let snapshot = metric
|
||||
.get_value(&glean, "store1")
|
||||
|
|
@ -211,7 +211,7 @@ fn the_accumulate_samples_api_correctly_handles_negative_values() {
|
|||
);
|
||||
|
||||
// Accumulate the samples.
|
||||
metric.accumulate_samples_sync(&glean, [-1, 1, 2, 3].to_vec());
|
||||
metric.accumulate_samples_sync(&glean, &[-1, 1, 2, 3]);
|
||||
|
||||
let snapshot = metric
|
||||
.get_value(&glean, "store1")
|
||||
|
|
@ -255,7 +255,7 @@ fn the_accumulate_samples_api_correctly_handles_overflowing_values() {
|
|||
const MAX_SAMPLE_TIME: u64 = 1000 * 1000 * 1000 * 60 * 10;
|
||||
let overflowing_val = MAX_SAMPLE_TIME as i64 + 1;
|
||||
// Accumulate the samples.
|
||||
metric.accumulate_samples_sync(&glean, [overflowing_val, 1, 2, 3].to_vec());
|
||||
metric.accumulate_samples_sync(&glean, &[overflowing_val, 1, 2, 3]);
|
||||
|
||||
let snapshot = metric
|
||||
.get_value(&glean, "store1")
|
||||
|
|
|
|||
2
third_party/rust/glean/.cargo-checksum.json
vendored
2
third_party/rust/glean/.cargo-checksum.json
vendored
|
|
@ -1 +1 @@
|
|||
{"files":{"Cargo.toml":"bfe3d56022cde3f670f2c2a9dba0a302eb94a721aa38565d78e3456108e233c4","LICENSE":"1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5","README.md":"5627cc81e6187ab6c2b4dff061af16d559edcab64ba786bac39daa69c703c595","src/common_test.rs":"de47b53dcca37985c0a2b8c02daecbf32309aa54f5a4dd9290719c2c1fd0fa55","src/configuration.rs":"186b9d92e48f2f34f1ea51023ad83c9d7abec97bcb0b862641bcb79a93c97d9e","src/core_metrics.rs":"fef8fb4e5fa57c179836c6eb2cf59278fe3b8b036dbe57b0ff02971b4acd822f","src/lib.rs":"aa9c81fc6dc19ca1cb4bede25d554377a5d717fb3b246967edb1be12a395ce61","src/net/http_uploader.rs":"01ad5bd91384411a12c74434cd1c5cd585078cb34faba4615c70bdb669a9bccb","src/net/mod.rs":"f47b96bb878f1a6c771cedbaeaeefb270bc87fb1d1bbbed1b282dddca16216ed","src/private/event.rs":"d7c70c02648584c19c73af89e5180d3c6153c911f2c6830f7d1599b18d6150eb","src/private/mod.rs":"3565eb569d2b96f938f130abe0fc3ee3f55e7e03fd6501e309d3ef6af72ef6ee","src/private/object.rs":"3f70363a196aea46cc163af025a53e48c117c6208babc4bce772bb4c337cced8","src/private/ping.rs":"a6262a3453c77cbf30766c19b535a1bf66a37b2a316e8f87baee03025255c33e","src/system.rs":"6eae5b41c15eba9cad6dbd116abe3519ee3e1fe034e79bdd692b029829a8c384","src/test.rs":"6388b9e8bf96e0fb56ad71b7a5b5630d209ae62f1a65c62e878cbc1757ddd585","tests/common/mod.rs":"08fb9483d9b6ed9fe873b4395245166ae8a15263be750c7a8e298c41d9604745","tests/init_fails.rs":"906bbf0faa613976623e0cf782bd86545b49d76afaab182af7634690b747ebf7","tests/never_init.rs":"19bad996e22f7d6958cc1a650528530aa7d1aeb4a8ab42229a90bbc0315c8ed1","tests/no_time_to_init.rs":"06c81148c27d383cb708c0c80a2e806024c9955337d7adfba8c53aaeade9be67","tests/overflowing_preinit.rs":"7ad4b2274dd9240b53430859a4eb1d2597cf508a5a678333f3d3abbadd2ed4a7","tests/persist_ping_lifetime.rs":"81415dc1d74743f02269f0d0dfa524003147056853f080276972e64a0b761d3c","tests/persist_ping_lifetime_nopanic.rs":"18379d3ffbf4a2c8c684c04ff7a0660b86dfbbb447db2d24dfed6073cb7ddf8f","tests/schema.rs":"9d24028cab4dc60fe3c4d7a0bafbff0815cbc0249fa3e23625d42c3b4fa71734","tests/simple.rs":"1b8b227249ae9d3cc281db07ed779bc75252c7849b1c48b4ac3d765228d65b20","tests/test-shutdown-blocking.sh":"9b16a01c190c7062474dd92182298a3d9a27928c8fa990340fdd798e6cdb7ab2","tests/test-thread-crashing.sh":"ff1bc8e5d7e4ba3a10d0d38bef222db8bfba469e7d30e45b1053d177a4084f09","tests/upload_timing.rs":"3024b7999a0c23f2c3d7e59725b5455522e4e9fdf63e3265b93fea4cec18725f"},"package":"31529f2862321e3ddaed47293c79c6e8c7b6dc42366e345a36fd826fe6a8b48d"}
|
||||
{"files":{"Cargo.toml":"29b8551de6fff2f0fa3a821eb933f71a2a326b3ce3d37c25bcef3001f9146dfb","LICENSE":"1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5","README.md":"5627cc81e6187ab6c2b4dff061af16d559edcab64ba786bac39daa69c703c595","src/common_test.rs":"454df3d99eef045270e813946f921f56c39b16c18a5fadedc32829c3d44129cf","src/configuration.rs":"82b3a7933d913e1e2a4f328a76621db2d2e618d209d9785086d64c5c78c2a2d6","src/core_metrics.rs":"fef8fb4e5fa57c179836c6eb2cf59278fe3b8b036dbe57b0ff02971b4acd822f","src/lib.rs":"aa9c81fc6dc19ca1cb4bede25d554377a5d717fb3b246967edb1be12a395ce61","src/net/http_uploader.rs":"01ad5bd91384411a12c74434cd1c5cd585078cb34faba4615c70bdb669a9bccb","src/net/mod.rs":"f47b96bb878f1a6c771cedbaeaeefb270bc87fb1d1bbbed1b282dddca16216ed","src/private/event.rs":"d7c70c02648584c19c73af89e5180d3c6153c911f2c6830f7d1599b18d6150eb","src/private/mod.rs":"3565eb569d2b96f938f130abe0fc3ee3f55e7e03fd6501e309d3ef6af72ef6ee","src/private/object.rs":"3f70363a196aea46cc163af025a53e48c117c6208babc4bce772bb4c337cced8","src/private/ping.rs":"a6262a3453c77cbf30766c19b535a1bf66a37b2a316e8f87baee03025255c33e","src/system.rs":"6eae5b41c15eba9cad6dbd116abe3519ee3e1fe034e79bdd692b029829a8c384","src/test.rs":"6388b9e8bf96e0fb56ad71b7a5b5630d209ae62f1a65c62e878cbc1757ddd585","tests/common/mod.rs":"08fb9483d9b6ed9fe873b4395245166ae8a15263be750c7a8e298c41d9604745","tests/init_fails.rs":"906bbf0faa613976623e0cf782bd86545b49d76afaab182af7634690b747ebf7","tests/never_init.rs":"19bad996e22f7d6958cc1a650528530aa7d1aeb4a8ab42229a90bbc0315c8ed1","tests/no_time_to_init.rs":"06c81148c27d383cb708c0c80a2e806024c9955337d7adfba8c53aaeade9be67","tests/overflowing_preinit.rs":"7ad4b2274dd9240b53430859a4eb1d2597cf508a5a678333f3d3abbadd2ed4a7","tests/persist_ping_lifetime.rs":"81415dc1d74743f02269f0d0dfa524003147056853f080276972e64a0b761d3c","tests/persist_ping_lifetime_nopanic.rs":"18379d3ffbf4a2c8c684c04ff7a0660b86dfbbb447db2d24dfed6073cb7ddf8f","tests/schema.rs":"9d24028cab4dc60fe3c4d7a0bafbff0815cbc0249fa3e23625d42c3b4fa71734","tests/simple.rs":"1b8b227249ae9d3cc281db07ed779bc75252c7849b1c48b4ac3d765228d65b20","tests/test-shutdown-blocking.sh":"9b16a01c190c7062474dd92182298a3d9a27928c8fa990340fdd798e6cdb7ab2","tests/test-thread-crashing.sh":"ff1bc8e5d7e4ba3a10d0d38bef222db8bfba469e7d30e45b1053d177a4084f09","tests/upload_timing.rs":"3024b7999a0c23f2c3d7e59725b5455522e4e9fdf63e3265b93fea4cec18725f"},"package":"f58388f10d013e2d12bb58e6e76983ede120789956fe827913a3d2560c66d44d"}
|
||||
4
third_party/rust/glean/Cargo.toml
vendored
4
third_party/rust/glean/Cargo.toml
vendored
|
|
@ -13,7 +13,7 @@
|
|||
edition = "2021"
|
||||
rust-version = "1.66"
|
||||
name = "glean"
|
||||
version = "58.0.0"
|
||||
version = "58.1.0"
|
||||
authors = [
|
||||
"Jan-Erik Rediger <jrediger@mozilla.com>",
|
||||
"The Glean Team <glean-team@mozilla.com>",
|
||||
|
|
@ -35,7 +35,7 @@ license = "MPL-2.0"
|
|||
repository = "https://github.com/mozilla/glean"
|
||||
|
||||
[dependencies.glean-core]
|
||||
version = "58.0.0"
|
||||
version = "58.1.0"
|
||||
|
||||
[dependencies.inherent]
|
||||
version = "1"
|
||||
|
|
|
|||
1
third_party/rust/glean/src/common_test.rs
vendored
1
third_party/rust/glean/src/common_test.rs
vendored
|
|
@ -42,6 +42,7 @@ pub(crate) fn new_glean(
|
|||
Some(c) => c,
|
||||
None => ConfigurationBuilder::new(true, tmpname, GLOBAL_APPLICATION_ID)
|
||||
.with_server_endpoint("invalid-test-host")
|
||||
.with_event_timestamps(false)
|
||||
.build(),
|
||||
};
|
||||
|
||||
|
|
|
|||
2
third_party/rust/glean/src/configuration.rs
vendored
2
third_party/rust/glean/src/configuration.rs
vendored
|
|
@ -113,7 +113,7 @@ impl Builder {
|
|||
trim_data_to_registered_pings: false,
|
||||
log_level: None,
|
||||
rate_limit: None,
|
||||
enable_event_timestamps: false,
|
||||
enable_event_timestamps: true,
|
||||
experimentation_id: None,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ edition = "2018"
|
|||
license = "MPL-2.0"
|
||||
|
||||
[dependencies]
|
||||
glean = "58.0.0"
|
||||
glean = "58.1.0"
|
||||
log = "0.4"
|
||||
nserror = { path = "../../../xpcom/rust/nserror" }
|
||||
nsstring = { path = "../../../xpcom/rust/nsstring" }
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ license = "MPL-2.0"
|
|||
[dependencies]
|
||||
bincode = "1.0"
|
||||
chrono = "0.4.10"
|
||||
glean = "58.0.0"
|
||||
glean = "58.1.0"
|
||||
inherent = "1.0.0"
|
||||
log = "0.4"
|
||||
nsstring = { path = "../../../../xpcom/rust/nsstring", optional = true }
|
||||
|
|
|
|||
|
|
@ -92,6 +92,10 @@ impl CustomDistribution for CustomDistributionMetric {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn accumulate_single_sample_signed(&self, _sample: i64) {
|
||||
unimplemented!("bug 1884183: expose this to FOG")
|
||||
}
|
||||
|
||||
pub fn test_get_value<'a, S: Into<Option<&'a str>>>(
|
||||
&self,
|
||||
ping_name: S,
|
||||
|
|
|
|||
|
|
@ -374,6 +374,10 @@ impl TimingDistribution for TimingDistributionMetric {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn accumulate_single_sample(&self, _sample: i64) {
|
||||
unimplemented!("bug 1884183: expose this to FOG")
|
||||
}
|
||||
|
||||
/// **Exported for test purposes.**
|
||||
///
|
||||
/// Gets the currently stored value of the metric.
|
||||
|
|
|
|||
Loading…
Reference in a new issue