Skip to content

Commit

Permalink
Fix the rest of the bench scripts.
Browse files Browse the repository at this point in the history
Most of the other bench scripts are not covered by unit tests
currently, so there were no failure. Nevertheless, make them
all conform to the pattern: first create benchmark_run_dir,
then initialize the iterations file.

One exception is trafficgen: although it is covered by unit tests,
there were no failures because it did not initialized the iterations
file. This has been fixed.
  • Loading branch information
ndokos authored and portante committed Aug 1, 2019
1 parent 629d514 commit 92746e1
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 2 deletions.
4 changes: 4 additions & 0 deletions agent/bench-scripts/pbench-cyclictest
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ if [ ! -z "$cpu" ]; then
fi

mkdir -p $benchmark_run_dir/.running

# now that the benchmark_run_dir directory exists, we can initialize the iterations file
> ${benchmark_iterations}

printf "# these results generated with:\n# %s\n\n" "$script_name $orig_cmd" >$benchmark_summary_txt_file
printf "%20s%20s%20s%20s\n" "iteration" "min" "avg" "max" >>$benchmark_summary_txt_file
printf "\n" >>$benchmark_summary_txt_file
Expand Down
4 changes: 4 additions & 0 deletions agent/bench-scripts/pbench-dbench
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ if [ "$postprocess_only" != "y" ]; then
fi

mkdir -p $benchmark_run_dir/.running

# now that the benchmark_run_dir directory exists, we can initialize the iterations file
> ${benchmark_iterations}

benchmark_summary_txt_file="$benchmark_run_dir/summary-result.txt"
rm -f $benchmark_summary_txt_file
benchmark_summary_csv_file="$benchmark_run_dir/summary-result.csv"
Expand Down
4 changes: 4 additions & 0 deletions agent/bench-scripts/pbench-iozone
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ benchmark_iterations="${benchmark_run_dir}/.iterations"
benchmark_summary_file="$benchmark_run_dir/$benchmark-summary.txt"

mkdir -p $benchmark_run_dir/.running

# now that the benchmark_run_dir directory exists, we can initialize the iterations file
> ${benchmark_iterations}

export benchmark config
pbench-collect-sysinfo --group=$tool_group --dir=$benchmark_run_dir --sysinfo=$sysinfo beg
pbench-metadata-log --group=$tool_group --dir=$benchmark_run_dir beg
Expand Down
5 changes: 4 additions & 1 deletion agent/bench-scripts/pbench-linpack
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,14 @@ benchmark_fullname="${benchmark}_${config}_${date_suffix}"
export benchmark_run_dir="$pbench_run/${benchmark_fullname}"
benchmark_summary_txt_file="$benchmark_run_dir/$benchmark-summary.txt"
benchmark_summary_html_file="$benchmark_run_dir/$benchmark-summary.html"
benchmark_iterations="${benchmark_run_dir}/.iterations"

mkdir -p ${benchmark_run_dir}/.running

# now that the benchmark_run_dir directory exists, we can initialize the iterations file
> ${benchmark_iterations}

iteration=1-$threads-threads
benchmark_iterations="${benchmark_run_dir}/.iterations"
echo $iteration >> $benchmark_iterations
benchmark_results_dir="$benchmark_run_dir/$iteration/sample1"
result_file=$benchmark_results_dir/result.txt
Expand Down
3 changes: 3 additions & 0 deletions agent/bench-scripts/pbench-migrate
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ benchmark_summary_html_file="$benchmark_run_dir/$benchmark-summary.html"

mkdir -p ${benchmark_run_dir}/.running

# now that the benchmark_run_dir directory exists, we can initialize the iterations file
> ${benchmark_iterations}

loops=$round_trips
if [ $loops -eq 0 ]; then
loops=1
Expand Down
4 changes: 4 additions & 0 deletions agent/bench-scripts/pbench-netperf
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ if [ "$postprocess_only" != "y" ]; then
fi

mkdir -p $benchmark_run_dir/.running

# now that the benchmark_run_dir directory exists, we can initialize the iterations file
> ${benchmark_iterations}

benchmark_summary_txt_file="$benchmark_run_dir/$benchmark-summary.txt"
rm -f $benchmark_summary_txt_file
benchmark_summary_csv_file="$benchmark_run_dir/$benchmark-summary.csv"
Expand Down
4 changes: 4 additions & 0 deletions agent/bench-scripts/pbench-specjbb2005
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ if [ $? -ne 0 ]; then
exit 1
fi

# now that the benchmark_run_dir directory exists, we can initialize the iterations file
> ${benchmark_iterations}


pbench-register-tool-trigger --group=$tool_group --start-trigger="Timing Measurement began" --stop-trigger="Timing Measurement ended"

# Collect system information before we begin, and record the beginning.
Expand Down
5 changes: 4 additions & 1 deletion agent/bench-scripts/pbench-trafficgen
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,6 @@ fi

# we'll record the iterations in this file
benchmark_iterations="${benchmark_run_dir}/.iterations"
> ${benchmark_iterations}
mdlog=${benchmark_run_dir}/metadata.log

function record_default_iteration {
Expand Down Expand Up @@ -921,6 +920,10 @@ function record_profile_iteration {
}

mkdir -p $benchmark_run_dir/.running

# now that the benchmark_run_dir directory exists, we can initialize the iterations file
> ${benchmark_iterations}

# save a copy of the command, in case the test needs to be reproduced or post-processed again
echo "$script_name $pbench_cmd" >$benchmark_run_dir/$script_name.cmd
chmod +x $benchmark_run_dir/$script_name.cmd
Expand Down

0 comments on commit 92746e1

Please sign in to comment.