Skip to content

Commit

Permalink
Add --reverse-order option and switch order after each run on citrine (
Browse files Browse the repository at this point in the history
  • Loading branch information
NateBrady23 authored Apr 17, 2024
1 parent a0707d7 commit ae4234f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion toolset/benchmark/benchmarker.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def __init__(self, config):

# a list of all tests for this run
self.tests = self.metadata.tests_to_run()

if self.config.reverse_order:
self.tests.reverse()
self.results = Results(self)
self.docker_helper = DockerHelper(self)

Expand Down
6 changes: 6 additions & 0 deletions toolset/continuous/tfb-shutdown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@ ssh techempower@$TFB_DATABASE_HOST "$(typeset -f docker_clean); docker_clean"
echo "running docker_clean on client host"
ssh techempower@$TFB_CLIENT_HOST "$(typeset -f docker_clean); docker_clean"

if [ -z "$TFB_RUN_ORDER" ]; then
export TFB_RUN_ORDER="reverse"
else
unset TFB_RUN_ORDER
fi

echo "done with tfb-shutdown script"
1 change: 1 addition & 0 deletions toolset/continuous/tfb-startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ docker run \
--results-name "$TFB_RUN_NAME" \
--results-environment "$TFB_ENVIRONMENT" \
--results-upload-uri "$TFB_UPLOAD_URI" \
$(if [ "$TFB_RUN_ORDER" = "reverse" ]; then echo "--reverse-order"; fi) \
--quiet

echo "zipping the results"
Expand Down
7 changes: 7 additions & 0 deletions toolset/run-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ def main(argv=None):
help=
'Only print a limited set of messages to stdout, keep the bulk of messages in log files only'
)
parser.add_argument(
'--reverse-order',
action='store_true',
default=False,
help=
'Run the tests in reverse order, starting with the last test in the list'
)
parser.add_argument(
'--results-name',
help='Gives a name to this set of results, formatted as a date',
Expand Down
1 change: 1 addition & 0 deletions toolset/utils/benchmark_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def __init__(self, args):
self.duration = args.duration
self.exclude = args.exclude
self.quiet = args.quiet
self.reverse_order = args.reverse_order
self.server_host = args.server_host
self.database_host = args.database_host
self.client_host = args.client_host
Expand Down

0 comments on commit ae4234f

Please sign in to comment.