Skip to content

Commit

Permalink
Add folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Fontana authored and Pedro Fontana committed Apr 8, 2024
1 parent 859b791 commit be05a72
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions examples/hyper_threading/hyper-threading
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

thread_counts=(1 2 4 6 8 10 12 16 24 32 )
binary="target/release/hyper_threading"


cmd="hyperfine -r 1"

# Build the command string with all thread counts
for threads in "${thread_counts[@]}"; do
# For hyperfine, wrap each command in 'sh -c' to correctly handle the environment variable
cmd+=" -n \"threads: ${threads}\" 'sh -c \"RAYON_NUM_THREADS=${threads} ${binary}\"'"
done

# Execute the hyperfine command
echo "Executing benchmark for all thread counts"
eval $cmd
2 changes: 1 addition & 1 deletion examples/hyper_threading/hyper-threading-workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
thread_counts=(1 2 4 6 8 16 32)

# Define una lista con los nombres de los binarios
binaries=("hyper_threading_main" "hyper_threading_pr")
binaries=("hyper_threading_main_binary/hyper_threading_main" "hyper_threading_pr_binary/hyper_threading_pr")

# Itera sobre la lista de thread_counts
for threads in "${thread_counts[@]}"; do
Expand Down

0 comments on commit be05a72

Please sign in to comment.