Skip to content

Commit 156f0c5

Browse files
committed
keep public to run benchmarks now
1 parent 511930d commit 156f0c5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

opentelemetry-sdk/benches/attribute_set.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use criterion::{criterion_group, criterion_main, Criterion};
22
use opentelemetry::KeyValue;
3-
use opentelemetry_sdk::AttributeSet;
3+
use opentelemetry_sdk::metrics::AttributeSet;
44

55
// Run this benchmark with:
66
// cargo bench --bench attribute_set --features=metrics

opentelemetry-sdk/src/metrics/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl Eq for HashKeyValue {}
130130
/// This must implement [Hash], [PartialEq], and [Eq] so it may be used as
131131
/// HashMap keys and other de-duplication methods.
132132
#[derive(Clone, Default, Debug, PartialEq, Eq)]
133-
pub(crate) struct AttributeSet(Vec<HashKeyValue>, u64);
133+
pub struct AttributeSet(Vec<HashKeyValue>, u64);
134134

135135
impl From<&[KeyValue]> for AttributeSet {
136136
fn from(values: &[KeyValue]) -> Self {
@@ -168,12 +168,12 @@ impl AttributeSet {
168168
}
169169

170170
/// Returns `true` if the set contains no elements.
171-
pub(crate) fn is_empty(&self) -> bool {
171+
pub fn is_empty(&self) -> bool {
172172
self.0.is_empty()
173173
}
174174

175175
/// Retains only the attributes specified by the predicate.
176-
pub(crate) fn retain<F>(&mut self, f: F)
176+
pub fn retain<F>(&mut self, f: F)
177177
where
178178
F: Fn(&KeyValue) -> bool,
179179
{
@@ -184,7 +184,7 @@ impl AttributeSet {
184184
}
185185

186186
/// Iterate over key value pairs in the set
187-
pub(crate) fn iter(&self) -> impl Iterator<Item = (&Key, &Value)> {
187+
pub fn iter(&self) -> impl Iterator<Item = (&Key, &Value)> {
188188
self.0.iter().map(|kv| (&kv.0.key, &kv.0.value))
189189
}
190190
}

0 commit comments

Comments
 (0)