Skip to content
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

Flamegraphs #137

Open
wants to merge 100 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
d6f9dd5
Trim the whole GHA, use https://github.com/umccr/reusable-github-actions
brainstorm Jun 14, 2022
e2cb2a5
Repoint reusable workflows as per https://github.com/umccr/htsget-rs/…
brainstorm Jun 14, 2022
dea2bef
Comment indirection
brainstorm Jun 14, 2022
1926d93
derive Eq along w/ PartialEq: https://github.com/umccr/htsget-rs/runs…
brainstorm Jun 14, 2022
1c40a03
Comment the test and benchmarks for now, need to implement dependenci…
brainstorm Jun 14, 2022
3afe447
PartialEq, Eq errors
brainstorm Jun 15, 2022
28345c5
Hopefully done with that Eq lint?
brainstorm Jun 15, 2022
05b528f
Remove stray char in Cloud
brainstorm Jun 16, 2022
a63c889
Avoid duplicate CI runs
brainstorm Jun 20, 2022
dd4c794
Check passes, let's go for testing phase
brainstorm Jun 20, 2022
dd60301
Add job dependencies and drafting release module
brainstorm Jun 20, 2022
9d0c603
Enable benchmarking phase
brainstorm Jun 20, 2022
fa3f2a3
Trigger run
brainstorm Jun 20, 2022
83fbc40
Redundant comment
brainstorm Jun 20, 2022
7772201
Add a couple of TODO, test cargo-install for multiple crates at once
brainstorm Jun 20, 2022
b2dbe78
Will use slim Rust container for
brainstorm Jun 20, 2022
6d441a2
Need to get acquainted with conventional commits too, TODO
brainstorm Jun 20, 2022
52cb45d
Not fully convinced about shipping Docker too for devs, but giving it…
brainstorm Jun 20, 2022
44a7ac8
Adjust timing and number of samples to avoid criterion warnings/runou…
brainstorm Jun 21, 2022
56dcdd8
Benches closer to plots with this PR
brainstorm Jun 21, 2022
b13c6f9
Original htsnexus implementation is gone from DNANexus, @mlin? /cc @o…
brainstorm Jun 21, 2022
2c6a383
Commits are non-convetional still, but let's try the request/search b…
brainstorm Jun 23, 2022
358baf2
Move rusable bits away from this repo
brainstorm Jun 23, 2022
f17f51b
Release should depend on benchmarking regressions too
brainstorm Jun 23, 2022
e499902
Merge branch 'main' into better_ci
brainstorm Dec 14, 2022
514dff4
futures.push_back might have been deprecated? Switching to .push
brainstorm Dec 14, 2022
acb549c
Inline format arguments (make clippy happy)
brainstorm Dec 15, 2022
157b46b
Cargo fmt
brainstorm Dec 15, 2022
c9b92ce
Back pedal on push vs push_back (the former actually being the one be…
brainstorm Dec 15, 2022
251771d
More inline format strings
brainstorm Dec 15, 2022
b573d0c
Fixup clippy on nightly too, not only stable
brainstorm Dec 15, 2022
e755f42
Ignore secrets and data
brainstorm Dec 16, 2022
52fae72
Clarify which lambda runtime we are using
brainstorm Dec 16, 2022
272c1a4
cargo clippy --fix for all features
brainstorm Dec 16, 2022
0fde7f3
Cargo clippy --fix has been stabilised now
brainstorm Dec 16, 2022
ae0c09d
Get rid of reusable workflows strategy
brainstorm Dec 16, 2022
ad7ea00
Focus on search benchmarks generation and storage
brainstorm Dec 19, 2022
4b56ab1
auto-push must be false when external-data-json-path is set since thi…
brainstorm Dec 19, 2022
0ecf6d6
Is the benchmark output being generated on stderr instead of stdout?
brainstorm Dec 19, 2022
bc0ac01
Update secret accordingly, valid only for 1 year for now
brainstorm Dec 19, 2022
6f7af68
Undo stdout/stderr redirection for search-benchmarks
brainstorm Dec 20, 2022
28d4a0c
Going a bit more verbatim on github-action-benchmark docs, perhaps mi…
brainstorm Dec 20, 2022
88f7caf
Where is the benchmark output.txt and why is it not found?
brainstorm Dec 20, 2022
a5e36d2
Repeated htsget-rs/htsget-rs path segment in https://github.com/umccr…
brainstorm Dec 20, 2022
9b256e9
Hopefully correct path now/
brainstorm Dec 20, 2022
0a1439d
Hardcode output.txt path on the runner directory
brainstorm Dec 21, 2022
2239c74
Test github-action-benchmark fork and cargo-criterion tool feature ou…
brainstorm Dec 22, 2022
94382af
Use the right branch for the forked action
brainstorm Dec 22, 2022
820fc92
Forked GHA requires a runnable release to work
brainstorm Dec 23, 2022
a62fcc4
Test custom cargo criterion release: does the GHA refer to tags/relea…
brainstorm Jan 3, 2023
6b5bed7
Test all the changes introduced in the GHA
brainstorm Jan 4, 2023
212fd88
Testing native benchmark report keeping
brainstorm Jan 5, 2023
fd1cdff
Newer checkout migrates from deprecated Node12 to Node16
brainstorm Jan 5, 2023
d5b4c2e
Merge branch 'main' into better_ci
brainstorm Jan 5, 2023
5b09498
Merge conflicts
brainstorm Jan 5, 2023
2c254a3
Add release-plz, first run
brainstorm Jan 5, 2023
76ee9ad
error: all dependencies must have a version specified when publishing.
brainstorm Jan 5, 2023
76fe060
[skip ci] Repoint dependencies to its respective repos instead of loc…
brainstorm Jan 5, 2023
77b7772
he remote server responded with an error: missing or empty metadata f…
brainstorm Jan 5, 2023
a9993b0
Add missing licenses/descriptions pre-crates.io publishing [ci skip]
brainstorm Jan 5, 2023
a80128f
Adding the rest of attributes to avoid cargo publish warnings [ci skip]
brainstorm Jan 5, 2023
f06b2d2
Last metadata addition to avoid cargo publish warnings on htsget-test…
brainstorm Jan 5, 2023
a017b88
Rename htsget-http-actix -> htsget-actix, htsget-http-lambda -> htsge…
mmalenic Jan 6, 2023
98ba11a
Version bump all deps
brainstorm Jan 6, 2023
208097d
Better names for the lib side of this crate
brainstorm Jan 6, 2023
65fcc29
Cleanup before release as described in https://github.com/MarcoIeni/r…
brainstorm Jan 6, 2023
585485e
Temporarily disable htsget-test as suggested by cargo maintainers
brainstorm Jan 6, 2023
a9e9565
Revert "Temporarily disable htsget-test as suggested by cargo maintai…
brainstorm Jan 6, 2023
b059b56
Stray fmt
brainstorm Jan 6, 2023
c2d29f8
Cargo clippy
brainstorm Jan 6, 2023
ecc1d00
This cargo fmt did not go through?
brainstorm Jan 6, 2023
48b16a0
Only trigger on those branches as I'm testing, thanks @Marcoleni, let…
brainstorm Jan 7, 2023
18b755b
Split monolith GHA workflow into 3 actions, was running out of space …
brainstorm Jan 7, 2023
b9a2fbd
Drop custom generate token for release-plz
brainstorm Jan 7, 2023
f365aed
No more than 1 level for tests and benchmarks [ci skip]
brainstorm Jan 9, 2023
ccc6c27
No target/criterion/<name_of_bench>/flamegraph.svg found :/
brainstorm Jan 9, 2023
99ff449
I suspect that the profiler only generates .svg's under Linux?
brainstorm Jan 9, 2023
19e9c39
Check if the flamegraph .svg has been generated alongside the JSONs
brainstorm Jan 9, 2023
736d0a7
wrong location/bench name?
brainstorm Jan 9, 2023
a950199
Rewire criterion function, just generates JSONs, no flamegraphs.svg y…
brainstorm Jan 10, 2023
e63a1ff
Simplify cargo bench flamegraphs bench example a bit further and run …
brainstorm Jan 10, 2023
6b3ad15
Merge deploy conflict(s)
brainstorm Jan 15, 2023
e3d8875
Merge branch 'better_ci' into flamegraphs
brainstorm Jan 16, 2023
7d6686d
Merge branch 'main' into flamegraphs
brainstorm Jan 16, 2023
975df66
Switch from criterion-rs custom profiler strategy to cargo-flamegraph…
brainstorm Jan 16, 2023
3c05343
Install cargo flamegraphs and match GHA names with jobs to avoid conf…
brainstorm Jan 16, 2023
b3a2825
Implicit --flamegraph will not be recognised by CLI
brainstorm Jan 16, 2023
968f854
CI job failed with Linux-specific kernel settings, apply https://gith…
brainstorm Jan 16, 2023
4449b67
Binary perfile data seems to be spewed on stdout for Linux, does not …
brainstorm Jan 16, 2023
b18a45d
What are the previous settings?
brainstorm Jan 17, 2023
482ee8e
Merge branch 'main' into flamegraphs
brainstorm May 12, 2023
c2d646b
[ci skip] ResolveResponse trait having some weird import issues... re…
brainstorm May 16, 2023
722bef8
fix(benchmarks): set correct feature flags for htsget dependencies
mmalenic May 16, 2023
26d6eea
[ci skip] (fix): Crate typo, htsget-config instead of htsget-search /…
brainstorm May 16, 2023
896cd5e
Add bencher.dev CI/CD
brainstorm May 16, 2023
87f932d
Correct GHA syntax for bencher
brainstorm May 17, 2023
5f2f7c5
Adding uses as bencher.dev docs assume, I think they are wrong though?
brainstorm May 17, 2023
7e6a624
Move requests benchmarks to htsget-benchmarks crate and **separate** …
brainstorm May 17, 2023
8b680cd
[ci skip] Experiment with criterion-rs external profiler hooks (https…
brainstorm May 22, 2023
16569f4
Change benchmark adapter/harness as suggested by @epompeii (thx)
brainstorm May 29, 2023
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
64 changes: 51 additions & 13 deletions .github/workflows/benchmarking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- flamegraphs

permissions:
# deployments permission to deploy GitHub pages website
Expand All @@ -12,8 +13,13 @@ permissions:
contents: write

jobs:
test:
benchmarks:
runs-on: ${{ matrix.os }}
env:
BENCHER_PROJECT: htsget-rs
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
BENCHER_ADAPTER: rust-criterion
BENCHER_TESTBED: localhost
strategy:
matrix:
rust: [stable]
Expand Down Expand Up @@ -45,15 +51,47 @@ jobs:
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-criterion
- name: Run search benchmarks
run: cargo criterion --bench search-benchmarks --message-format=json -- LIGHT 1> search-benchmarks-output.json
- name: Store search benchmark result
uses: brainstorm/github-action-benchmark@cargo-criterion-v3
with:
name: Search benchmark
tool: 'cargo-criterion'
output-file-path: search-benchmarks-output.json
native-benchmark-data-dir-path: target/criterion
fail-on-alert: false
github-token: ${{ secrets.HTSGET_RS_BENCHMARKS_TOKEN }}
auto-push: true
- uses: bencherdev/bencher@v0.2.43
- name: Run bencher.dev
run: |
bencher run \
--if-branch "$GITHUB_REF_NAME" \
--else-if-branch "$GITHUB_BASE_REF" \
--else-if-branch main \
--err \
"cargo bench"
# - name: Install cargo flamegraphs
# uses: baptiste0928/cargo-install@v1
# with:
# crate: flamegraph
# - name: Run search benchmarks
# run: cargo criterion --bench search-benchmarks --message-format=json -- LIGHT 1> search-benchmarks-output.json
# - name: Generate flamegraphs and flamecharts for profiling
# run: |
# if [ "$RUNNER_OS" == "Linux" ]; then
# sudo cat /proc/sys/kernel/kptr_restrict
# sudo cat /proc/sys/kernel/perf_event_paranoid
# echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid
# # Chart == X axis is time
# # cargo run record -P ... TODO: not-perf
# #cargo flamegraph --deterministic --flamechart -o flamechart.svg --bench search-benchmarks -- --bench >& flamechart.bin
# # Graph == X axis is stack profile population
# cargo flamegraph --deterministic --bench search-benchmarks -- --bench >& flamegraph.bin
# else # PERFILE binary contents spewed on stdout on Linux?: https://github.com/flamegraph-rs/flamegraph/issues/248
# cargo flamegraph --deterministic --flamechart -o flamechart.svg --bench search-benchmarks -- --bench
# # Graph == X axis is stack profile population
# cargo flamegraph --deterministic --bench search-benchmarks -- --bench
# fi
# shell: bash
# - name: Batch flame* results under criterion-rs output
# run: mkdir -p target/criterion/flameplots && cp flame*.svg flame*.bin target/criterion/flameplots
# - name: Store search benchmark result
# uses: brainstorm/github-action-benchmark@cargo-criterion-v3
# with:
# name: Search benchmark
# tool: 'cargo-criterion'
# output-file-path: search-benchmarks-output.json
# native-benchmark-data-dir-path: target/criterion
# fail-on-alert: false
# github-token: ${{ secrets.HTSGET_RS_BENCHMARKS_TOKEN }}
# auto-push: true
3 changes: 1 addition & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ on:
push:
branches:
- main
pull_request:

jobs:
test:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
target
*.code-workspace
*.vcf.gz
*.svg
.vscode
.idea
deploy/.build
Expand Down
Loading