Skip to content

Commit

Permalink
Create the iterations file after benchmark_run_dir is created.
Browse files Browse the repository at this point in the history
Change pbench-uperf and pbench-user-benchmark.  This makes all the
current unit tests pass.
  • Loading branch information
ndokos authored and portante committed Aug 1, 2019
1 parent 781f5ff commit 629d514
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion agent/bench-scripts/pbench-uperf
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@ else
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_iteration {
Expand All @@ -466,6 +465,10 @@ function record_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
5 changes: 4 additions & 1 deletion agent/bench-scripts/pbench-user-benchmark
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ benchmark_run_dir="$pbench_run/${benchmark_fullname}"

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

mdlog=${benchmark_run_dir}/metadata.log

# make the run dir available to the user script
Expand All @@ -137,6 +137,9 @@ benchmark_results_dir="$benchmark_run_dir/$iteration/sample1"
mkdir -p $benchmark_results_dir/.running
export benchmark_results_dir=$benchmark_results_dir

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

# For now, since we usually only ever run one iteration here, don't bother
# collecting sysinfo data before and after, just do it after.
# pbench-collect-sysinfo --group=$tool_group --dir=$benchmark_run_dir beg
Expand Down

0 comments on commit 629d514

Please sign in to comment.