Skip to content

Commit

Permalink
[eclipse-iceoryx#361] Rename cpu affinity args for benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
elfenpiff committed Sep 1, 2024
1 parent d488b7f commit 2758d3f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions benchmarks/event/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn perform_benchmark<T: Service>(args: &Args) {
let barrier = BarrierBuilder::new(3).create(&barrier_handle).unwrap();

let t1 = ThreadBuilder::new()
.affinity(args.cpu_core_thread_1)
.affinity(args.cpu_core_participant_1)
.priority(255)
.spawn(|| {
let notifier_a2b = service_a2b.notifier_builder().create().unwrap();
Expand All @@ -60,7 +60,7 @@ fn perform_benchmark<T: Service>(args: &Args) {
});

let t2 = ThreadBuilder::new()
.affinity(args.cpu_core_thread_2)
.affinity(args.cpu_core_participant_2)
.priority(255)
.spawn(|| {
let notifier_b2a = service_b2a.notifier_builder().create().unwrap();
Expand Down Expand Up @@ -115,12 +115,12 @@ struct Args {
/// Activate full log output
#[clap(short, long)]
debug_mode: bool,
/// The cpu core that shall be used by thread 1
/// The cpu core that shall be used by participant 1
#[clap(long, default_value_t = 0)]
cpu_core_thread_1: usize,
/// The cpu core that shall be used by thread 2
cpu_core_participant_1: usize,
/// The cpu core that shall be used by participant 2
#[clap(long, default_value_t = 1)]
cpu_core_thread_2: usize,
cpu_core_participant_2: usize,
}

fn main() {
Expand Down
12 changes: 6 additions & 6 deletions benchmarks/publish-subscribe/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn perform_benchmark<T: Service>(args: &Args) -> Result<(), Box<dyn std::error::
let barrier = BarrierBuilder::new(3).create(&barrier_handle).unwrap();

let t1 = ThreadBuilder::new()
.affinity(args.cpu_core_thread_1)
.affinity(args.cpu_core_participant_1)
.priority(255)
.spawn(|| {
let sender_a2b = service_a2b
Expand Down Expand Up @@ -80,7 +80,7 @@ fn perform_benchmark<T: Service>(args: &Args) -> Result<(), Box<dyn std::error::
});

let t2 = ThreadBuilder::new()
.affinity(args.cpu_core_thread_2)
.affinity(args.cpu_core_participant_2)
.priority(255)
.spawn(|| {
let sender_b2a = service_b2a
Expand Down Expand Up @@ -143,12 +143,12 @@ struct Args {
/// Activate full log output
#[clap(short, long)]
debug_mode: bool,
/// The cpu core that shall be used by thread 1
/// The cpu core that shall be used by participant 1
#[clap(long, default_value_t = 0)]
cpu_core_thread_1: usize,
/// The cpu core that shall be used by thread 2
cpu_core_participant_1: usize,
/// The cpu core that shall be used by participant 2
#[clap(long, default_value_t = 1)]
cpu_core_thread_2: usize,
cpu_core_participant_2: usize,
/// The size in bytes of the payload that shall be used
#[clap(short, long, default_value_t = 8192)]
payload_size: usize,
Expand Down

0 comments on commit 2758d3f

Please sign in to comment.