Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Thaumy committed Mar 19, 2024
1 parent 0b8ddb8 commit 664b37f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/perf_event/counting/group/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ where
F: FnMut(),
{
let mut group = gen_group();
let ev_1_guard = group.add_member(&gen_cfg(ev_1)).unwrap();
let ev_2_guard = group.add_member(&gen_cfg(ev_2)).unwrap();
let ev_1_guard = group.add_member(&mut gen_cfg(ev_1)).unwrap();
let ev_2_guard = group.add_member(&mut gen_cfg(ev_2)).unwrap();

{
let result = group.stat().unwrap();
Expand Down Expand Up @@ -81,8 +81,8 @@ where
F: FnMut(),
{
let mut group = gen_group();
let ev_1_guard = group.add_member(&gen_cfg(ev_1)).unwrap();
let ev_2_guard = group.add_member(&gen_cfg(ev_2)).unwrap();
let ev_1_guard = group.add_member(&mut gen_cfg(ev_1)).unwrap();
let ev_2_guard = group.add_member(&mut gen_cfg(ev_2)).unwrap();

{
let result = group.stat().unwrap();
Expand Down Expand Up @@ -118,8 +118,8 @@ where
F: FnMut(),
{
let mut group = gen_group();
let ev_1_guard = group.add_member(&gen_cfg(ev_1)).unwrap();
let ev_2_guard = group.add_member(&gen_cfg(ev_2)).unwrap();
let ev_1_guard = group.add_member(&mut gen_cfg(ev_1)).unwrap();
let ev_2_guard = group.add_member(&mut gen_cfg(ev_2)).unwrap();

let mut group = group.enable().unwrap();
workload();
Expand Down Expand Up @@ -149,8 +149,8 @@ where
F: FnMut(),
{
let mut group = gen_group();
let mut ev_1_guard = group.add_member(&gen_cfg(ev_1)).unwrap();
let mut ev_2_guard = group.add_member(&gen_cfg(ev_2)).unwrap();
let mut ev_1_guard = group.add_member(&mut gen_cfg(ev_1)).unwrap();
let mut ev_2_guard = group.add_member(&mut gen_cfg(ev_2)).unwrap();

{
let ev_1 = ev_1_guard.stat().unwrap().event_count;
Expand Down
4 changes: 2 additions & 2 deletions src/perf_event/counting/single/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ where

fn gen_counter(ev: &Event) -> Counter {
let scopes = [EventScope::User, EventScope::Host];
let cfg = Config::new(ev, &scopes);
let mut cfg = Config::new(ev, &scopes);

Counter::new(&Process::Current, &Cpu::Any, &cfg).unwrap()
Counter::new(&Process::Current, &Cpu::Any, &mut cfg).unwrap()
}

fn test_stat<F>(ev: &Event, workload: &mut F)
Expand Down

0 comments on commit 664b37f

Please sign in to comment.