-
Notifications
You must be signed in to change notification settings - Fork 21
Publish scripts to run benchmarks #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
d156656
Adding benchmarks
edeandrea a1ee31c
Add docs for quarkus/spring versions
edeandrea 0c36e63
Add docs for quarkus/spring versions
edeandrea 9f6fda9
Fix some typos
edeandrea e7780cc
Adding documentation
edeandrea b621b28
Getting running on macOS
edeandrea b35e73c
Adding JVM_ARGS
edeandrea 552d448
Adding profile JVM args
edeandrea 5c332f3
Adding benchmarks
edeandrea 2cb9be2
Update requirements
edeandrea 3c4cd92
Update requirements
edeandrea 93d3225
Reorganize output json
edeandrea 8f58e1a
Reorganize output json
edeandrea fa2cd6c
Reorganize output json
edeandrea bf717b0
Update documentation
edeandrea 4dcdfd0
Update documentation
edeandrea fa1b889
Add -e option to allow extra commands to be passed to qDup
edeandrea 837637f
Remove need for gh cli
edeandrea 4000bc2
Adding connection errors & request timeouts
edeandrea 79334c9
Reorganize directories and create publish-results script
edeandrea 29510fe
Reorganize directories and create publish-results script
edeandrea File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| #!/bin/bash | ||
| set -euo pipefail | ||
|
|
||
| thisdir="$(realpath $(dirname "$0"))" | ||
|
|
||
| help() { | ||
|
|
||
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: async-profiler #https://github.com/apangin/async-profiler.git | ||
| scripts: | ||
| async-profiler-configure: | ||
| - read-state: ${{os}} | ||
| then: | ||
| - regex: linux | ||
| then: | ||
| - script: sudo | ||
| with: | ||
| command: sh -c "echo 1 > /proc/sys/kernel/perf_event_paranoid" | ||
| - script: sudo | ||
| with: | ||
| command: sh -c "echo 0 > /proc/sys/kernel/kptr_restrict" | ||
|
|
||
| # downloads the latest async-profiler release to ${{BASE_DIR}}/${{ASYNC_PROFILER}} | ||
| download-unpack-async-profiler: | ||
| - read-state: ${{os}} | ||
| then: | ||
| - regex: linux | ||
| then: | ||
| - set-state: platform linux-x64 | ||
| - set-state: filesuffix .tar.gz | ||
| - set-state: unpack_command tar xvf | ||
| else: | ||
| - set-state: platform macos | ||
| - set-state: filesuffix .zip | ||
| - set-state: unpack_command unzip | ||
| - sh: curl -L -o ${{ASYNC_PROFILER}}${{filesuffix}} $(curl -s -L https://api.github.com/repos/${{ASYNC_PROFILER}}/${{ASYNC_PROFILER}}/releases/latest | jq -r '.assets[] | select(.name | contains ("${{platform}}${{filesuffix}}")) | .browser_download_url') 2>/dev/null | ||
| - sh: ${{unpack_command}} ${{ASYNC_PROFILER}}${{filesuffix}} | ||
| then: | ||
| - regex: (?<subDir>^[^/]+)/ | ||
| then: | ||
| - sh: mv ${{subDir}}/ ${{ASYNC_PROFILER}} | ||
|
|
||
| async-profiler-install: | ||
| - sh: if test -d ${{ASYNC_PROFILER_DIR}} ; then rm -rf ${{ASYNC_PROFILER_DIR}}; fi | ||
| - sh: cd ${{BASE_DIR}} | ||
| - script: download-unpack-async-profiler | ||
|
|
||
| #waits for ${{WAIT_START}} then ${{DELAY}}, creates a profile using the configured parameters then downloads it immediately | ||
| #works with 3.x, not 2.x | ||
| async-profiler-run: | ||
| - sh: cd ${{ASYNC_PROFILER_DIR}} | ||
| - wait-for: ${{wait_start:}} # don't wait by default | ||
| - sleep: ${{delay:0}} | ||
| - sh: > | ||
| bin/asprof | ||
| -d ${{duration__10}} | ||
| -f /tmp/flamegraph.${{suffix__html}} | ||
| -o ${{format__flamegraph}} | ||
| -e ${{events__cpu}} | ||
| ${{="${{enableTotal __ }}".toLowerCase() == "true" ? "--total" : ""}} | ||
| --title ${{title__async-profiler}} | ||
| ${{pid}} | ||
| separator: __ | ||
| - download: /tmp/flamegraph.${{suffix:html}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: cgroups related scripts | ||
| scripts: | ||
| join-cgroup: | ||
| - set-signal: CGROUP_${{CGROUP_NAME:perf-cgroup}}_SET 1 | ||
| - wait-for: CGROUP_${{CGROUP_NAME:perf-cgroup}}_SET | ||
| - read-state: ${{os}} | ||
| then: | ||
| - regex: linux | ||
| then: | ||
| - sh: echo ${{SHELL_PID}} >> /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/tasks/cgroup.procs | ||
| else: | ||
| - log: "Non-Linux OS doesn't support cgroups" | ||
| - signal: CGROUP_${{CGROUP_NAME:perf-cgroup}}_DONE | ||
|
|
||
| create-cgroup: | ||
| - read-state: ${{os}} | ||
| then: | ||
| - regex: linux | ||
| then: | ||
| - sh: mkdir /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/ | ||
| - sh: echo "+cpu" >> /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/cgroup.subtree_control | ||
| - sh: echo "+cpuset" >> /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/cgroup.subtree_control | ||
| - sh: echo "+memory" >> /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/cgroup.subtree_control | ||
| - sh: mkdir /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/tasks/ | ||
| - sh: echo ${{CGROUP_CPUSET}} > /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/tasks/cpuset.cpus | ||
| - sh: echo ${{CGROUP_MAX_MEM}} > /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/tasks/memory.max | ||
| else: | ||
| - log: "Non-Linux OS doesn't support cgroups" | ||
|
|
||
| delete-cgroup: | ||
| - read-state: ${{os}} | ||
| then: | ||
| - regex: linux | ||
| then: | ||
| - sh: echo "-cpu" >> /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/cgroup.subtree_control | ||
| - sh: echo "-cpuset" >> /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/cgroup.subtree_control | ||
| - sh: echo "-memory" >> /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/cgroup.subtree_control | ||
| - sh: rmdir /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/tasks/ | ||
| - sh: rmdir /sys/fs/cgroup/${{CGROUP_NAME:perf-cgroup}}/ | ||
| else: | ||
| - log: "Non-Linux OS doesn't support cgroups" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: Homebrew scripts | ||
| scripts: | ||
| ensure-homebrew: | ||
| - sh: | ||
| command: brew help | ||
| ignore-exit-code: true | ||
| - regex: ".*command not found" | ||
| then: | ||
| - script: install-homebrew | ||
|
|
||
| install-homebrew: | ||
| - sh: curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | ||
|
|
||
| install-brew-package: | ||
| - script: ensure-homebrew | ||
| - sh: brew install -q ${{package}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| name: Java related scripts | ||
| scripts: | ||
| ensure-graalvm: | ||
| - script: sdk-select-java | ||
| with: | ||
| java_version: ${{config.jvm.graalvm.version}} | ||
| install_if_missing: true | ||
| - log: Setting GRAALVM_HOME | ||
| - sh: export GRAALVM_HOME=$(sdk home java ${{config.jvm.graalvm.version}}) | ||
| - log: Showing GraalVM version | ||
| - sh: $GRAALVM_HOME/bin/java -version | ||
|
|
||
| ensure-java: | ||
| - script: sdk-select-java | ||
| with: | ||
| java_version: ${{config.jvm.version}} | ||
| set_as_default: Y | ||
| install_if_missing: true | ||
| - log: Showing Java version | ||
| - sh: java -version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: JBang scripts | ||
| scripts: | ||
| ensure-jbang-mac: | ||
| - script: check-and-install-package | ||
| with: | ||
| command: jbang | ||
| package: jbangdev/tap/jbang | ||
|
|
||
| ensure-jbang-linux: | ||
| - sh: which jbang | ||
| - regex: ".*no jbang in.*" | ||
| then: | ||
| - sh: "curl -Ls https://sh.jbang.dev | bash -s - app setup" | ||
|
|
||
| ensure-jbang: | ||
| - script: ensure-jbang-${{os}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| name: Maven scripts | ||
| scripts: | ||
| check-dependency-exists: | ||
| - sh: cd ${{DIR}} | ||
| - sh: ./mvnw dependency:get -Dartifact=${{groupId}}:${{artifactId}}:${{version}} -Dpackaging=pom | ||
| then: | ||
| - regex: BUILD FAILURE | ||
| then: | ||
| - abort: Unable to find ${{groupId}}:${{artifactId}}:${{version}} in maven central | ||
| else: | ||
| - log: Artifact ${{groupId}}:${{artifactId}}:${{version}} is available in maven central |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| name: OS-specific/detection scripts | ||
| scripts: | ||
| detect-os: | ||
| - sh: uname -a | ||
| then: | ||
| - regex: ".*Darwin.*" | ||
| then: | ||
| - set-state: RUN.os macos | ||
| - regex: ".*Linux.*" | ||
| then: | ||
| - set-state: RUN.os linux | ||
|
|
||
| capture-os-info: | ||
| - sh: uname -m | ||
| - set-state: RUN.env.host.ARCH | ||
| - sh: uname -r | ||
| - set-state: RUN.env.host.RELEASE_LEVEL | ||
| - sh: uname -s | ||
| - set-state: RUN.env.host.OS | ||
| - sh: uname -v | ||
| - set-state: RUN.env.host.VERSION_LEVEL | ||
|
|
||
| sudo-linux: | ||
| - sh: sudo ${{command}} | ||
|
|
||
| sudo-macos: | ||
| - sh: ${{command}} | ||
|
|
||
| sudo: | ||
| - script: sudo-${{os}} | ||
| with: | ||
| command: ${{command}} | ||
|
|
||
| check-and-install-package: | ||
| - sh: which ${{command}} | ||
| - regex: ".*no ${{command}} in.*" | ||
| then: | ||
| - script: install-package | ||
| with: | ||
| package: ${{package}} | ||
|
|
||
| install-package-linux: | ||
| - script: sudo | ||
| with: | ||
| command: dnf install -y ${{package}} | ||
| - regex: "Error: Unable to find a match: ${{package}}" | ||
| then: | ||
| - abort: "Unable to install package: ${{package}}" | ||
| - set-state: | ||
| key: RUN.INSTALLED_PACKAGES | ||
| value: ${{= [...${{RUN.INSTALLED_PACKAGES:[]}}, '${{package}}'] }} | ||
|
|
||
| install-package-macos: | ||
| - script: install-brew-package ${{package}} | ||
| - regex: "Error: No formulae or casks found for ${{package}}" | ||
| then: | ||
| - abort: "Unable to install package: ${{package}}" | ||
|
|
||
| install-package: | ||
| - script: install-package-${{os}} | ||
|
|
||
| sync-drop-fs-cache-linux: | ||
| - script: sudo | ||
| with: | ||
| command: sh -c "echo 3 > /proc/sys/vm/drop_caches" | ||
|
|
||
| sync-drop-fs-cache-macos: | ||
| - sh: sudo purge | ||
|
|
||
| sync-drop-fs-cache: | ||
| - sh: sync | ||
| - read-state: ${{DROP_OS_FILESYSTEM_CACHES:false}} | ||
| then: | ||
| - regex: true | ||
| then: | ||
| - script: sync-drop-fs-cache-${{os}} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| name: Requirements needed to run benchmarks | ||
| scripts: | ||
| ensure-requirements: | ||
| - script: ensure-graalvm | ||
| - script: ensure-java | ||
| - script: ensure-git | ||
| - script: ensure-gcc | ||
| - script: ensure-nvm | ||
| - script: ensure-jbang | ||
| - script: ensure-jvm-opts | ||
|
|
||
| ensure-jvm-opts: | ||
| - read-state: config.profiler.name | ||
| then: | ||
| - regex: jfr|flamegraph | ||
| then: | ||
| - set-state: PROFILER_JVM_ARGS -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints | ||
|
|
||
| ensure-gcc-linux: | ||
| - script: check-and-install-package | ||
| with: | ||
| command: gcc | ||
| package: gcc.x86_64 zlib-devel.x86_64 | ||
|
|
||
| ensure-gcc-macos: | ||
| - script: check-and-install-package | ||
| with: | ||
| command: gcc | ||
| package: gcc | ||
|
|
||
| ensure-gcc: | ||
| - script: ensure-gcc-${{os}} | ||
|
|
||
| install-nvm-linux: | ||
| - sh: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash | ||
|
|
||
| install-nvm-macos: | ||
| - script: check-and-install-package | ||
| with: | ||
| command: nvm | ||
| package: nvm | ||
|
|
||
| ensure-nvm: | ||
| - sh: which nvm | ||
| - regex: ".*no nvm in.*" | ||
| then: | ||
| - script: install-nvm-${{os}} | ||
| - sh: nvm install --lts | ||
| - sh: nvm use --lts | ||
|
|
||
| ensure-git-linux: | ||
| - script: check-and-install-package | ||
| with: | ||
| command: git | ||
| package: git-all | ||
|
|
||
| ensure-git-macos: | ||
| - script: check-and-install-package | ||
| with: | ||
| command: git | ||
| package: git | ||
|
|
||
| ensure-git: | ||
| - script: ensure-git-${{os}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: sdkman helper scripts | ||
| scripts: | ||
| sdkman-uninstall: #https://sdkman.io/install | ||
| - sh: which sdk | ||
| - regex: "no sdk in" | ||
| else: | ||
| - sh: whoami | ||
| - regex: (?<me>.*) | ||
| - sh: "[[ -d /home/${{me}}/.sdkman ]] && rm -rf /home/${{me}}/.sdkman" | ||
| - sh: sed -i 's/#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!.*//g' /home/${{me}}/.bashrc | ||
| - sh: sed -i 's/export SDKMAN_DIR=.*//g' /home/${{me}}/.bashrc | ||
| - sh: sed -i 's/.*.sdkman.*//g' /home/${{me}}/.bashrc | ||
|
|
||
| sdkman-install: #https://sdkman.io/install | ||
| - sh: | ||
| command: sdk help | ||
| ignore-exit-code: true | ||
| prompt: | ||
| "Would you like to upgrade now? (Y/n): ": "Y" | ||
| - regex: ".*command not found" | ||
| then: | ||
| - log: Installing SDKMAN | ||
| - sh: curl -s "https://get.sdkman.io" | bash | ||
| then: | ||
| - regex: "Enjoy" | ||
| else: | ||
| - abort: failed to install SDKMAN | ||
| - sh: source "$HOME/.sdkman/bin/sdkman-init.sh" | ||
| else: | ||
| - log: Updating SDKMAN | ||
| - sh: sdk flush | ||
| - sh: sdk selfupdate force | ||
| then: | ||
| - regex: "Successfully upgraded SDKMAN" | ||
| else: | ||
| - abort: failed to upgrade SDKMAN | ||
| - sh: | ||
| command: sdk version | ||
| prompt: | ||
| "Would you like to upgrade now? (Y/n): ": "Y" | ||
| then: | ||
| - regex: "SDKMAN (?<RUN.sdk_version>[\\d\\.\\+]+)" | ||
|
|
||
| sdk-select-java: | ||
| - sh: echo ${{install_if_missing:false}} | ||
| then: | ||
| - regex: true | ||
| then: | ||
| - script: sdkman-install | ||
| - sh: | ||
| command: sdk flush && sdk install java ${{java_version}} | ||
| prompt: | ||
| "set as default? (Y/n): ": "${{set_as_default:N}}" | ||
| - sh: sdk use java ${{java_version}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| name: state-array functions | ||
| scripts: | ||
| state-array-push: | ||
| - set-state: | ||
| key: ${{array}} | ||
| value: ${{=[...${{${{array}}¬[]}}, ${{value}}]}} | ||
| separator: ¬ | ||
|
|
||
| state-array-calc-avg: | ||
| - set-state: | ||
| key: ${{var-name}} | ||
| value: ${{= (${{${{array}}}}.reduce((a, b) => a + b, 0) / ${{${{array}}}}.length) || 0 }} | ||
|
|
||
| state-array-calc-max: | ||
| - set-state: | ||
| key: ${{var-name}} | ||
| value: ${{= Math.max(...${{${{array}}}}) }} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.