]> granicus.if.org Git - icu/commitdiff
ICU-22075 Adds a random waiting period (0 - 179 secs) to each test that runs as
authorgnrunge <nrunge@google.com>
Thu, 21 Jul 2022 17:42:06 +0000 (10:42 -0700)
committerNorbert Runge <41129501+gnrunge@users.noreply.github.com>
Fri, 22 Jul 2022 15:14:58 +0000 (08:14 -0700)
part of a high concurrency performance test setup. This will disperse commits
of performance test results into the data branch over a wider time frame and
drastically reduces the chance of data uploads failing after ten unsuccesful
commit attempts.

Test runs showed a huge drop in failed commits/retry, from a high of 113
without wait down to only 4 with the extra wait.

ICU-22075 Add comment explaining the rationale of the random
sleep period prior to test execution.

.github/workflows/icu_merge_ci.yml

index 718eaa541463c201185fb873e3f1d53065dba859..19aa7a35b05acb46573cdf6e4edc9fb7da2dc711 100644 (file)
@@ -363,6 +363,10 @@ jobs:
           ant perf-tests;
           cd perf-tests;
           mkdir -p perf/results/j_decimalformatperf/${{ matrix.locale }}/${{ matrix.perf }};
+          # Delay execution by random number of seconds. Spreading execution of multiple
+          # tests over 180 secs. minimizes the possibility of push conflicts when storing
+          # tests results in the data branch.
+          sleep $(($RANDOM % 180));
           java -cp ./out/bin:../tools/misc/out/bin/:../icu4j.jar com.ibm.icu.dev.test.perf.DecimalFormatPerformanceTest ${{ matrix.perf }} -a -t 2 -p 4 -L ${{ matrix.locale }} "#,###.##" "1.234,56" -r 1 | tee perf/results/j_decimalformatperf/${{ matrix.locale }}/${{ matrix.perf }}/output.txt
 
       - name: Store performance test results
@@ -415,6 +419,10 @@ jobs:
           ant perf-tests;
           cd perf-tests;
           mkdir -p perf/results/j_normperf/${{ matrix.source_text }}/${{ matrix.perf }};
+          # Delay execution by random number of seconds. Spreading execution of multiple
+          # tests over 180 secs. minimizes the possibility of push conflicts when storing
+          # tests results in the data branch.
+          sleep $(($RANDOM % 180));
           java -cp ./out/bin:../tools/misc/out/bin/:../icu4j.jar com.ibm.icu.dev.test.perf.NormalizerPerformanceTest ${{ matrix.perf }} -a -t 2 -p 4 -f $DATA_FILE_PATH/${{ matrix.source_text }}.txt -e UTF-8 ${{ matrix.mode }} | tee perf/results/j_normperf/${{ matrix.source_text }}/${{ matrix.perf }}/output.txt
           cat perf/results/j_normperf/${{ matrix.source_text }}/${{ matrix.perf }}/output.txt
 
@@ -535,6 +543,10 @@ jobs:
           ant perf-tests;
           cd perf-tests;
           mkdir -p perf/results/j_converterperf/${{ matrix.source_text }}/${{ matrix.test_enc }}/${{ matrix.perf }};
+          # Delay execution by random number of seconds. Spreading execution of multiple
+          # tests over 180 secs. minimizes the possibility of push conflicts when storing
+          # tests results in the data branch.
+          sleep $(($RANDOM % 180));
           java -cp ./out/bin:../tools/misc/out/bin/:../icu4j.jar:../icu4j-charset.jar com.ibm.icu.dev.test.perf.ConverterPerformanceTest ${{ matrix.perf }} -a -t 2 -p 4 -f $DATA_FILE_PATH/${{ matrix.source_text }}.txt -e UTF-8 -T ${{ matrix.test_enc }} | tee perf/results/j_converterperf/${{ matrix.source_text }}/${{ matrix.test_enc }}/${{ matrix.perf }}/output.txt
 
       - name: Store performance test results
@@ -602,6 +614,10 @@ jobs:
           ant perf-tests;
           cd perf-tests;
           mkdir -p perf/results/j_dateformatperf/${{ matrix.locale }}/${{ matrix.perf }}/${{ env.DDIR }};
+          # Delay execution by random number of seconds. Spreading execution of multiple
+          # tests over 180 secs. minimizes the possibility of push conflicts when storing
+          # tests results in the data branch.
+          sleep $(($RANDOM % 180));
           java -cp ./out/bin:../tools/misc/out/bin/:../icu4j.jar com.ibm.icu.dev.test.perf.DateFormatPerformanceTest ${{ matrix.perf }} -a -t 2 -p 4 -L ${{ matrix.locale }} ${{ env.PARM }} -r 1 | tee perf/results/j_dateformatperf/${{ matrix.locale }}/${{ matrix.perf }}/${{ env.DDIR }}/output.txt
 
       - name: Store performance test results