Skip to content

Commit

Permalink
chore(perf): document GitHub action usage (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden authored Jun 30, 2023
1 parent 7c43c94 commit 0df7762
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions perf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@ This project includes the following components:

Benchmark results can be visualized with https://observablehq.com/@mxinden-workspace/libp2p-performance-dashboard.

## Provision infrastructure
## Running via GitHub Action

### Bootstrap
1. Create a pull request with your changes on https://github.com/libp2p/test-plans/.
2. Trigger GitHub Action for branch on https://github.com/libp2p/test-plans/actions/workflows/perf.yml (see _Run workflow_ button).
3. Wait for action run to finish and to push a commit to your branch.
4. Visualize results on https://observablehq.com/@libp2p-workspace/performance-dashboard.

## Running via local machine

### Provision infrastructure

1. Save your public SSH key as the file `./terraform/modules/short_lived/files/perf.pub`; or generate a new key pair with `make ssh-keygen` and add it to your SSH agent with `make ssh-add`.
2. `cd terraform/configs/local`
Expand All @@ -19,15 +26,15 @@ Benchmark results can be visualized with https://observablehq.com/@mxinden-works
5. `CLIENT_IP=$(terraform output -raw client_ip)`
6. `SERVER_IP=$(terraform output -raw server_ip)`

## Build and run implementations
### Build and run implementations

_WARNING_: Running the perf tests might take a while.

1. `cd runner`
2. `npm ci`
3. `npm run start -- --client-public-ip $CLIENT_IP --server-public-ip $SERVER_IP`

## Deprovision infrastructure
### Deprovision infrastructure

1. `cd terraform/configs/local`
2. `terraform destroy`
Expand Down

0 comments on commit 0df7762

Please sign in to comment.