From: gnrunge Date: Tue, 28 Jun 2022 17:49:45 +0000 (-0700) Subject: ICU-22036 Adds ICU4J date formatting performance test, which is last of the X-Git-Tag: cldr/2022-08-01~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58060eafdc69ac7a060e8b80d942246adc471f0f;p=icu ICU-22036 Adds ICU4J date formatting performance test, which is last of the ICU4J performance tests. --- diff --git a/.github/workflows/icu_merge_ci.yml b/.github/workflows/icu_merge_ci.yml index 89a7901bb61..718eaa54146 100644 --- a/.github/workflows/icu_merge_ci.yml +++ b/.github/workflows/icu_merge_ci.yml @@ -552,10 +552,77 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} comment-on-alert: true + # ICU4J performance test for date formatting + icu4j-dateformatperf: + strategy: + fail-fast: false + matrix: + perf: [TestICUConstruction, TestICUParse, TestICUFormat] + locale: [en_US] + # The parameters don't make for good directory names. Add an identifying digit + # at the end to be used as directory name for the results. + parms: ['"dddd MMM yyyy" "15 Jan 2007" 1', '"HH:mm" "13:13" 2', '"HH:mm zzzz" "13:13 Pacific Standard Time" 3', '"HH:mm z" "13:13 PST" 4', '"HH:mm Z" "13:13 -0800" 5'] + include: + - locale: sw_KE + parms: '"dddd MMM yyyy" "15 Jan 2007" 1' + perf: TestICUConstruction + - locale: sw_KE + parms: '"dddd MMM yyyy" "15 Jan 2007" 1' + perf: TestICUParse + - locale: sw_KE + parms: '"dddd MMM yyyy" "15 Jan 2007" 1' + perf: TestICUFormat + + runs-on: ubuntu-latest + steps: + - name: Checkout and setup + uses: actions/checkout@v2 + with: + lfs: true + - name: Checkout lfs objects + run: git lfs pull + - uses: actions/setup-java@v1 + with: + java-version: '8' + + - name: Extract identifying digit and parameter. + run: | + ddir='${{ matrix.parms }}'; + echo "PARM=${ddir:: -2}" >> $GITHUB_ENV; + echo "DDIR=${ddir: -1}" >> $GITHUB_ENV + - name: Build and run dateformatperf + run: | + # This file needs to be restored otherwise GHA cannot + # check-out the perfdata branch. Setting up this task with GH lfs + # modifies the file but the details of why and how are unknown. + git restore --staged tools/multi/proj/icu4cscan/old-xmls.tar.bz2 + git restore tools/multi/proj/icu4cscan/old-xmls.tar.bz2 + cd icu4j; + ant; + ant perf-tests; + cd perf-tests; + mkdir -p perf/results/j_dateformatperf/${{ matrix.locale }}/${{ matrix.perf }}/${{ env.DDIR }}; + 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 + uses: gregtatum/github-action-benchmark@d3f06f738e9612988d575db23fae5ca0008d3d12 + with: + # The perf tests result data is in ndjson format. + tool: 'ndjson' + output-file-path: icu4j/perf-tests/perf/results/j_dateformatperf/${{ matrix.locale }}/${{ matrix.perf }}/${{ env.DDIR }}/output.txt + # Tentative setting. + alert-threshold: '200%' + fail-on-alert: true + gh-pages-branch: perfdata + benchmark-data-dir-path: perf/results/j_dateformatperf/${{ matrix.locale }}/${{ matrix.perf }}/${{ env.DDIR }} + auto-push: true + github-token: ${{ secrets.GITHUB_TOKEN }} + comment-on-alert: true + # Retrieve performance test results and upload results to remote repository perf-test-data-move: name: Copy perf data to remote repo for visualization - needs: [icu4c-performance-tests, icu4c-performance-tests-with-files, icu4c-strsrchperf, icu4j-unicodesetperf, icu4j-ucharacterperf, icu4j-decimalformatperf, icu4j-normperf, icu4j-converterperf] + needs: [icu4c-performance-tests, icu4c-performance-tests-with-files, icu4c-strsrchperf, icu4j-unicodesetperf, icu4j-ucharacterperf, icu4j-decimalformatperf, icu4j-normperf, icu4j-converterperf, icu4j-dateformatperf] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2