Skip to content

Commit

Permalink
chore(cardano-chain-follower): Add some READMEs to the cardano-chain-…
Browse files Browse the repository at this point in the history
…follower overhead benchmark
  • Loading branch information
FelipeRosa committed Apr 20, 2024
1 parent e15ee56 commit a4ace8c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions .config/dictionaries/project.dic
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Datelike
dreps
encryptor
Errno
Earthfile
excalidraw
fadvise
fcntl
Expand Down
5 changes: 5 additions & 0 deletions hermes/crates/cardano-chain-follower/testbed/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Testbed

This workspace contains test scenarios for the `cardano-chain-follower` crate
in order the measure implementation details that are not so easily tested by
automated test frameworks.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Overhead Benchmark

The purpose of this benchmark is to measure the overhead that using the `cardano-chain-follower` crate
has on top of the `pallas` crate which is used to implement most of the chain follower features.

## Running

In order to execute the benchmark you need a valid Mithril snapshot to point it to.
It doesn't matter which network the snapshot is from because the benchmark will only read the data from it.

There are 2 modes in which the benchmark can be executed:

| Benchmark name | Description |
---------------------------|--------------|
| pallas | When executed with `--bench-name pallas`, the benchmark reads the Mithril snapshot from origin to its tip using only the `pallas` crate mechanisms |
| cardano‑chain‑follower | When executed with `--bench-name cardano-chain-follower` it uses the `cardano-chain-follower` crate to follow the chain from origin to the tip of the specified snapshot |

One way of executing the benchmark is as follows:

```sh
cargo run --release -- --bench-name cardano-chain-follower --mithril-snapshot-path PATH_TO_MITHRIL_SNAPSHOT
```

## Earthfile

The Earthfile has targets for building and running the benchmark.
It also contains targets to fetch Mithril snapshots and save them locally.

0 comments on commit a4ace8c

Please sign in to comment.