-
Notifications
You must be signed in to change notification settings - Fork 213
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
[ADP-3091] Add memory benchmarks to CI #4043
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
efcc584
Add scripting around the memory benchmark.
paolino 4dc2901
Parameterized node and wallet configuration in cluster with the execu…
paolino a306b2a
Add working dir to wallet launcher.
paolino 4b4e4e7
Add memory benchmark to the nightly pipeline.
paolino b16fb3b
Split the script to use `nix shell` to bring the node executable in s…
paolino 6b7dbf7
Fix bash linting issues.
paolino 450cc87
Address reviews.
paolino 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 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,49 @@ | ||
#! /usr/bin/env nix-shell | ||
#! nix-shell -i bash -p coreutils gnugrep gawk time haskellPackages.hp2pretty buildkite-agent | ||
|
||
set -euo pipefail | ||
echo "------------------------ Setup ------------------------------------------" | ||
TMPDIR="${TMPDIR:-/tmp}" | ||
export TMPDIR="/$TMPDIR/bench/memory" | ||
mkdir -p $TMPDIR | ||
echo "TMPDIR: $TMPDIR" | ||
|
||
artifact_name=memory | ||
echo "artifact_name: $artifact_name" | ||
|
||
export log="$artifact_name.log" | ||
echo "log: $log" | ||
|
||
export error_log="$artifact_name.error.log" | ||
echo "error_log: $error_log" | ||
|
||
echo "------------------------ Setup done -------------------------------------" | ||
|
||
echo "------------------------ Nix call ---------------------------------------" | ||
nix shell \ | ||
'.#ci.benchmarks.memory' \ | ||
'.#cardano-node' \ | ||
'.#cardano-wallet' \ | ||
-c "scripts/bench-memory.sh" | ||
|
||
echo "------------------------ Nix call done ----------------------------------" | ||
|
||
echo "------------------------ Results ----------------------------------------" | ||
mv cardano-wallet.hp $artifact_name.hp | ||
hp2pretty $artifact_name.hp | ||
|
||
if [ -n "${BUILDKITE:-}" ]; then | ||
echo "--- Upload" | ||
buildkite-agent artifact upload $artifact_name.svg | ||
buildkite-agent artifact upload $log | ||
buildkite-agent artifact upload $error_log | ||
|
||
echo "+++ Heap profile" | ||
printf '\033]1338;url='"artifact://$artifact_name.svg"';alt='"Heap profile"'\a\n' | ||
|
||
fi | ||
echo "------------------------ Results done -----------------------------------" | ||
|
||
echo "------------------------ Cleanup ----------------------------------------" | ||
rm -rf $TMPDIR | ||
echo "------------------------ Cleanup done -----------------------------------" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes a little sense from the outside, is it a temporary state of the things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea, how should it be done ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean the fact that we have benchmarks in two different namespaces:
packages.benchmarks.cardano-wallet-benchmarks
packages.benchmarks.cardano-wallet
The questions are:
benchmarks.cardano-wallet-benchmars
andbenchmarks.cardano-wallet
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, the nix expression
packages.benchmarks.cardano-package-name
contains the benchmark components of the cabal packagecardano-package-name
. In this case, we have two cabal packages:cardano-wallet
andcardano-wallet-benchmarks
.I have put the benchmarks in
cardano-wallet-benchmarks
into a separate packages because they do not have a compile-time dependency oncardano-wallet
, only a run-time dependency.I'm not against putting them in the same
cardano-wallet.cabal
file, but I felt that putting the run-time benchmarks into a separate package would be better for enforcing the phase separation (compile/run).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, now I see your logic. This is more like a naming issue. I wonder if we can have this distinction "compile/runtime" reflected in the nix derivation names?