Skip to content

Commit

Permalink
Merge #1845
Browse files Browse the repository at this point in the history
1845: Add latency benchmark for shelley r=rvl a=rvl

Relates to #1825.

### Overview

- Ports latency benchmarks to shelley backend.
- Refactors duplicate code into a shared module.
- Adds listStakePools to benchmarks

Co-authored-by: Rodney Lorrimar <[email protected]>
Co-authored-by: Piotr Stachyra <[email protected]>
  • Loading branch information
3 people authored Jul 14, 2020
2 parents f1a0511 + ff22079 commit 52966c3
Show file tree
Hide file tree
Showing 11 changed files with 462 additions and 39 deletions.
16 changes: 10 additions & 6 deletions .buildkite/bench-latency.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@

set -euo pipefail

bench_name_jormungandr=bench-latency-jormungandr
bench_name_byron=bench-latency-byron
cd `dirname $0`/..

echo "--- Build"
nix-build -A benchmarks.cardano-wallet-jormungandr.latency -o $bench_name_jormungandr
nix-build -A benchmarks.cardano-wallet-byron.latency -o $bench_name_byron
nix-build -A benchmarks.cardano-wallet-jormungandr.latency -o bench-latency-jormungandr
nix-build -A benchmarks.cardano-wallet-byron.latency -o bench-latency-byron
nix-build -A benchmarks.cardano-wallet-shelley.latency -o bench-latency-shelley

# Note: the tracing will not work if program output is piped
# to another process (e.g. "tee").
# It says "Error: Switchboard's queue full, dropping log items!"

echo "+++ Run benchmark - byron"

./$bench_name_byron/bin/latency
( cd lib/byron && ../../bench-latency-byron/bin/latency )

echo "+++ Run benchmark - shelley"

( cd lib/shelley && ../../bench-latency-shelley/bin/latency )

echo "+++ Run benchmark - jormungandr"

./$bench_name_jormungandr/bin/latency
( cd lib/jormungandr && ../../bench-latency-jormungandr/bin/latency )
7 changes: 7 additions & 0 deletions .weeder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
- message:
- name: Module reused between components
- module: Cardano.Wallet.Byron.Faucet
- package:
- name: cardano-wallet-shelley
- section:
- name: test:integration bench:latency
- message:
- name: Module reused between components
- module: Cardano.Wallet.Shelley.Faucet
- package:
- name: cardano-wallet-core
- section:
Expand Down
2 changes: 0 additions & 2 deletions lib/byron/cardano-wallet-byron.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@ benchmark latency
, stm
, temporary
, text
build-tools:
cardano-wallet-byron
type:
exitcode-stdio-1.0
hs-source-dirs:
Expand Down
2 changes: 0 additions & 2 deletions lib/jormungandr/cardano-wallet-jormungandr.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,6 @@ benchmark latency
, stm
, temporary
, text
build-tools:
cardano-wallet-jormungandr
type:
exitcode-stdio-1.0
hs-source-dirs:
Expand Down
Loading

0 comments on commit 52966c3

Please sign in to comment.