Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
PSeitz committed Oct 14, 2024
1 parent a60b1a0 commit 5aff789
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- stable
- beta
- nightly
- 1.77.0 # MSRV
- 1.81.0 # MSRV
name: test-${{ matrix.features.label}}

steps:
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ keywords = ["perf", "profiler", "benchmark", "memory"]
categories = ["development-tools::profiling"]
license = "MIT"
exclude = ["*logo*"]
rust-version = "1.81"

[lints.clippy]
cargo = { priority = -1, level = "deny" }
Expand Down
2 changes: 1 addition & 1 deletion src/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ fn get_perf_counter(
#[cfg(target_os = "linux")]
{
_events
.downcast_plugin::<PerfCounterPerBench>(PERF_CNT_EVENT_LISTENER_NAME)
.downcast_plugin::<PerfCounterPlugin>(PERF_CNT_EVENT_LISTENER_NAME)
.and_then(|counters| {
counters
.get_by_bench_id_mut(_bench_id)
Expand Down
4 changes: 2 additions & 2 deletions src/bench_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ impl BenchRunner {
}
#[cfg(target_os = "linux")]
{
use crate::plugins::perf_counter::PerfCounterPerBench;
use crate::plugins::perf_counter::PerfCounterPlugin;
if self.config().enable_perf {
self.listeners
.add_plugin_if_absent(PerfCounterPerBench::default());
.add_plugin_if_absent(PerfCounterPlugin::default());
}
}

Expand Down
1 change: 0 additions & 1 deletion src/plugins/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ pub mod events;

pub(crate) mod perf_counter;

#[cfg(target_os = "linux")]
pub use perf_counter::*;

pub use cache_trasher::*;
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/perf_counter/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ pub static PERF_CNT_EVENT_LISTENER_NAME: &str = "_binggan_perf";
/// Integration via EventListener
/// One counter per bench id.
#[derive(Default)]
pub struct PerfCounterPerBench {
pub struct PerfCounterPlugin {
perf_per_bench: PerBenchData<Option<PerfCounters>>,
}

impl PerfCounterPerBench {
impl PerfCounterPlugin {
/// Get the perf counter for a bench id
pub(crate) fn get_by_bench_id_mut(&mut self, bench_id: &BenchId) -> Option<&mut PerfCounters> {
self.perf_per_bench
Expand All @@ -116,7 +116,7 @@ impl PerfCounterPerBench {
}
}

impl EventListener for PerfCounterPerBench {
impl EventListener for PerfCounterPlugin {
fn as_any(&mut self) -> &mut dyn Any {
self
}
Expand Down

0 comments on commit 5aff789

Please sign in to comment.