From c817fa2948796815a2b313ce367230370e26cfda Mon Sep 17 00:00:00 2001 From: Matthew Boddewyn <31598686+mattbodd@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:01:10 -0800 Subject: [PATCH] Remove etw benchmark and revert etw module to be private --- opentelemetry-etw-metrics/benches/etw.rs | 29 ------------------------ opentelemetry-etw-metrics/src/lib.rs | 2 +- 2 files changed, 1 insertion(+), 30 deletions(-) delete mode 100644 opentelemetry-etw-metrics/benches/etw.rs diff --git a/opentelemetry-etw-metrics/benches/etw.rs b/opentelemetry-etw-metrics/benches/etw.rs deleted file mode 100644 index fdb1a842..00000000 --- a/opentelemetry-etw-metrics/benches/etw.rs +++ /dev/null @@ -1,29 +0,0 @@ -//! run with `$ cargo bench --bench etw -- --exact ` to run specific test for logs -//! So to run test named "fibonacci" you would run `$ cargo bench --bench etw -- --exact fibonacci` -//! To run all tests for logs you would run `$ cargo bench --bench etw` -//! -/* -The benchmark results: -criterion = "0.5.1" -OS: Windows 11 Enterprise N, 23H2, Build 22631.4460 -Hardware: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz 2.79 GHz, 16vCPUs -RAM: 64.0 GB -| Test | Average time| -|--------------------------------|-------------| -| write_event | 2.0649ns | -*/ - -use criterion::{criterion_group, criterion_main, Criterion}; -use opentelemetry_etw_metrics::etw::write; - -fn write_event() { - let buffer = "This is a test buffer".as_bytes(); - write(buffer); -} - -fn criterion_benchmark(c: &mut Criterion) { - c.bench_function("write_event", |b| b.iter(|| write_event())); -} - -criterion_group!(benches, criterion_benchmark); -criterion_main!(benches); diff --git a/opentelemetry-etw-metrics/src/lib.rs b/opentelemetry-etw-metrics/src/lib.rs index 5b6029fc..56689e9a 100644 --- a/opentelemetry-etw-metrics/src/lib.rs +++ b/opentelemetry-etw-metrics/src/lib.rs @@ -1,4 +1,4 @@ -pub mod etw; +mod etw; mod exporter; pub use exporter::MetricsExporter;