Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/ion-java-performance-regression-detector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# 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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add on: pull request too? So we can see the performance changes during code review section as well.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add on: pull request too? So we can see the performance changes during code review section as well.

That's a good idea, changes will be updated in the following commit

branches: [ master ]
pull_request:
branches: [ master ]

jobs:
detetct-regression:
name: Detetct Regression

runs-on: ubuntu-latest

steps:
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- 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

- 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: 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
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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant empty lines.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant empty lines.

Changes will be updated.

- name: Clean maven dependency repository
run : rm -r /home/runner/.m2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to avoid deleting the whole directory?

E.g., The only different thing we have is different commits of ion-java, Is there anyway to replace ion-java only? This would make the workflow more efficient.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to avoid deleting the whole directory?

E.g., The only different thing we have is different commits of ion-java, Is there anyway to replace ion-java only? This would make the workflow more efficient.

Is that mean replace the /.m2/repository/ion/ion-java? When the first version of ion-java has been built, all dependencies relevant to this version of ion-java will be downloaded to /.m2/repository/ion/ion-java, the reason I deleted the whole directory is to make sure when the new commit come in, and build ion-java-benchmark-cli will not reuse the dependency from the last step. But yes, if only delete the .m2/repository/ion/ion-jave would be more efficient, that would be better.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline.


- name: Checkout ion-java repository from the new commit
uses: actions/checkout@v2
with:
submodules: recursive

- 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: 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
run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar read testWorkflow.ion -o readPerformanceNew.ion -r ion