Browse Source

Add --reverse-order option and switch order after each run on citrine (#8860)

Nate 1 year ago
parent
commit
ae4234f98a

+ 2 - 1
toolset/benchmark/benchmarker.py

@@ -29,7 +29,8 @@ class Benchmarker:
 
 
         # a list of all tests for this run
         # a list of all tests for this run
         self.tests = self.metadata.tests_to_run()
         self.tests = self.metadata.tests_to_run()
-
+        if self.config.reverse_order:
+            self.tests.reverse()
         self.results = Results(self)
         self.results = Results(self)
         self.docker_helper = DockerHelper(self)
         self.docker_helper = DockerHelper(self)
 
 

+ 6 - 0
toolset/continuous/tfb-shutdown.sh

@@ -30,4 +30,10 @@ ssh techempower@$TFB_DATABASE_HOST "$(typeset -f docker_clean); docker_clean"
 echo "running docker_clean on client host"
 echo "running docker_clean on client host"
 ssh techempower@$TFB_CLIENT_HOST "$(typeset -f docker_clean); docker_clean"
 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"
 echo "done with tfb-shutdown script"

+ 1 - 0
toolset/continuous/tfb-startup.sh

@@ -38,6 +38,7 @@ docker run \
   --results-name "$TFB_RUN_NAME" \
   --results-name "$TFB_RUN_NAME" \
   --results-environment "$TFB_ENVIRONMENT" \
   --results-environment "$TFB_ENVIRONMENT" \
   --results-upload-uri "$TFB_UPLOAD_URI" \
   --results-upload-uri "$TFB_UPLOAD_URI" \
+  $(if [ "$TFB_RUN_ORDER" = "reverse" ]; then echo "--reverse-order"; fi) \
   --quiet
   --quiet
 
 
 echo "zipping the results"
 echo "zipping the results"

+ 7 - 0
toolset/run-tests.py

@@ -84,6 +84,13 @@ def main(argv=None):
         help=
         help=
         'Only print a limited set of messages to stdout, keep the bulk of messages in log files only'
         '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(
     parser.add_argument(
         '--results-name',
         '--results-name',
         help='Gives a name to this set of results, formatted as a date',
         help='Gives a name to this set of results, formatted as a date',

+ 1 - 0
toolset/utils/benchmark_config.py

@@ -25,6 +25,7 @@ class BenchmarkConfig:
         self.duration = args.duration
         self.duration = args.duration
         self.exclude = args.exclude
         self.exclude = args.exclude
         self.quiet = args.quiet
         self.quiet = args.quiet
+        self.reverse_order = args.reverse_order
         self.server_host = args.server_host
         self.server_host = args.server_host
         self.database_host = args.database_host
         self.database_host = args.database_host
         self.client_host = args.client_host
         self.client_host = args.client_host