From 8cde5087f23cc1c4ddf7809ce66e8a623e09a7db Mon Sep 17 00:00:00 2001 From: Sun Date: Wed, 14 Jul 2021 09:51:17 -0700 Subject: [PATCH 1/3] Add ion-java performence regression detector to GitHub workflow --- ...n-java-performance-regression-detector.yml | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/ion-java-performance-regression-detector.yml diff --git a/.github/workflows/ion-java-performance-regression-detector.yml b/.github/workflows/ion-java-performance-regression-detector.yml new file mode 100644 index 0000000000..cde00d2507 --- /dev/null +++ b/.github/workflows/ion-java-performance-regression-detector.yml @@ -0,0 +1,61 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Ion Jave performance regression detector + +on: + push: + branches: [ master ] + +jobs: + build-ion-java: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + + + with: + fetch-depth: 2 + submodules: recursive + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - run: git checkout HEAD^ + - run: mvn clean install + + + + - uses: actions/checkout@v2 + with: + repository: amzn/ion-java-benchmark-cli + ref: master + + - name: Build with Maven + run: mvn clean install + - name: Verify the CLI executes + run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar --version + - name: clean maven repository + run : rm -r /home/runner/.m2 + + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - run: mvn clean install + + - uses: actions/checkout@v2 + with: + repository: amzn/ion-java-benchmark-cli + ref: master + + - name: Build with Maven + run: mvn clean install + - name: Verify the CLI executes + run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar --version \ No newline at end of file From a2c39a9dadf6e1725a01343a9fed7a74c23dc25d Mon Sep 17 00:00:00 2001 From: Sun Date: Wed, 21 Jul 2021 11:32:21 -0700 Subject: [PATCH 2/3] Fix the problem from the last commit and add the ability to generate benchmark result from two commits of ion-java --- ...n-java-performance-regression-detector.yml | 64 +++++++++++-------- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ion-java-performance-regression-detector.yml b/.github/workflows/ion-java-performance-regression-detector.yml index cde00d2507..4ed3132d35 100644 --- a/.github/workflows/ion-java-performance-regression-detector.yml +++ b/.github/workflows/ion-java-performance-regression-detector.yml @@ -6,56 +6,68 @@ name: Ion Jave performance regression detector on: push: branches: [ master ] + pull_request: + branches: [ master ] jobs: - build-ion-java: + detetct-regression: + name: Detetct Regression runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - - with: - fetch-depth: 2 - submodules: recursive - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - - run: git checkout HEAD^ - - run: mvn clean install + - name: Checkout ion-java repository from the current commit + uses: actions/checkout@v2 + with: + fetch-depth: 2 + submodules: recursive + - run: git checkout HEAD^ + - name: Build ion-java from the current commit + run: mvn clean install - - uses: actions/checkout@v2 + - name: Build ion-java-benchmark-cli based on the current ion-java + uses: actions/checkout@v2 with: repository: amzn/ion-java-benchmark-cli ref: master + - run: mvn clean install - - name: Build with Maven - run: mvn clean install - - name: Verify the CLI executes + - name: Check the version of ion-java and ion-java-benchmark-cli run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar --version - - name: clean maven repository + + - name: Generate test Ion Data + run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar generate -S 500 -T string -f ion_text testWorkflow.ion + + - name: Test read preformance of the ion-java from the current commit + run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar read testWorkflow.ion -o readPerformanceCurrent.ion -r ion + + + - name: Clean maven dependency repository run : rm -r /home/runner/.m2 - - uses: actions/checkout@v2 + - name: Checkout ion-java repository from the new commit + uses: actions/checkout@v2 with: submodules: recursive - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - run: mvn clean install - - uses: actions/checkout@v2 + - name: Build ion-java from the new commit + run: mvn clean install + + - name: Build ion-java-benchmark-cli based on the new ion-java + uses: actions/checkout@v2 with: repository: amzn/ion-java-benchmark-cli ref: master + - run: mvn clean install - - name: Build with Maven - run: mvn clean install - - name: Verify the CLI executes - run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar --version \ No newline at end of file + - name: Check the version of ion-java and ion-java-benchmark-cli + run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar --version + + - name: Test read preformance of ion-java from the new commit + run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar read testWorkflow.ion -o readPerformanceNew.ion -r ion \ No newline at end of file From 9b79fb1ebf59855cdebc283daca4813883677ecd Mon Sep 17 00:00:00 2001 From: Sun Date: Wed, 21 Jul 2021 22:51:44 -0700 Subject: [PATCH 3/3] Fix the minor problems from the last commit --- .../workflows/ion-java-performance-regression-detector.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ion-java-performance-regression-detector.yml b/.github/workflows/ion-java-performance-regression-detector.yml index 4ed3132d35..bfef7bfc82 100644 --- a/.github/workflows/ion-java-performance-regression-detector.yml +++ b/.github/workflows/ion-java-performance-regression-detector.yml @@ -38,7 +38,7 @@ jobs: ref: master - run: mvn clean install - - name: Check the version of ion-java and ion-java-benchmark-cli + - name: Check the version of ion-java run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar --version - name: Generate test Ion Data @@ -47,7 +47,6 @@ jobs: - name: Test read preformance of the ion-java from the current commit run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar read testWorkflow.ion -o readPerformanceCurrent.ion -r ion - - name: Clean maven dependency repository run : rm -r /home/runner/.m2 @@ -66,7 +65,7 @@ jobs: ref: master - run: mvn clean install - - name: Check the version of ion-java and ion-java-benchmark-cli + - name: Check the version of ion-java run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar --version - name: Test read preformance of ion-java from the new commit