Skip to content

Commit

Permalink
Add emulation test plan (#4)
Browse files Browse the repository at this point in the history
* Scaffold for a new test and implement sharing test instance information

* Setup discovery

* Subscribe to a topic and wait for `warmup` time to expire

* Add MaliciousBehaviour

* Remove unnecessary dependency

* Add emulation directory to CI

* Fix clippy warning

* Make sure swarm started listening at the time to the barrier

* Handle subscriptions

* Handle PRUNEs and schedule re-graft

* Publish messages

* Print peer scores

* Store scores to InfluxDB

* Store metrics to InfluxDB

* Store more metrics to InfluxDB

* Tweak comments

* Refactor queries

* Store Histogram metrics to InfluxDB

* Tweak scores

* Add `instance_peer_id` tag to the measurements

* Fix wrong field name

* Introduce message_rate

* Parameterize honest node configs

* Tweak comments and update default configs

* Fix deprecation warning (NetworkBehaviourEventProcess) and improve barrier method

* Install protoc

* Add README for emulation crate

* Update emulation/src/attacker.rs

Co-authored-by: Divma <[email protected]>

* Update emulation/src/honest.rs

Co-authored-by: Divma <[email protected]>

* Update emulation/src/utils.rs

Co-authored-by: Divma <[email protected]>

* Update emulation/src/utils.rs

Co-authored-by: Divma <[email protected]>

* Update emulation/src/utils.rs

Co-authored-by: Divma <[email protected]>

* Update emulation/src/utils.rs

Co-authored-by: Divma <[email protected]>

* Remove unnecessary unwrap

* Make some comments to docs

* Remove unnecessary comment

* No need to exclude test plans

because the lock file can be automatically generated

* Move tags commonly used to constants

* Remove plan directory

no longer need to change working-directory since the plans are members of workspace

* cargo update

* Upgrade libp2p from 0.46 to 0.48

* Remove needless patch

* Update libp2p (and prometheus-client)

* Revert to libp2p whose metrics encoding is fixed to `protobuf` to make the test plan work

* Add dashboard

* Add `Peer scores` dashboard

* Add panels to `Gossipsub metrics` dashboard

* invalid_messages_per_topic
* accepted_messages_per_topic
* ignored_messages_per_topic
* rejected_messages_per_topic
* topic_iwant_msgs

* Align the timestamp between  metrics of all instances

This is helpful when we want to sort metrics by something not timestamp(e.g. instance_name).

* Upgrade testground SDK to the latest version

* Rename dashboard

* Disable chrono's default features for the sake of compile times

* Remove debug code

* Add Grafana container with preconfigured datasources and dashboards

* Update README

Co-authored-by: Divma <[email protected]>
  • Loading branch information
ackintosh and divagant-martian authored Nov 21, 2022
1 parent 0670c91 commit cb2d84d
Show file tree
Hide file tree
Showing 20 changed files with 5,757 additions and 247 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ jobs:

cargo-fmt:
runs-on: ubuntu-latest
strategy:
matrix:
plan: [smoke]
defaults:
run:
working-directory: ${{ matrix.plan }}
steps:
- uses: actions/checkout@v2
- name: Get latest version of stable rust
Expand All @@ -27,14 +21,12 @@ jobs:
name: clippy
runs-on: ubuntu-latest
needs: cargo-fmt
strategy:
matrix:
plan: [smoke]
defaults:
run:
working-directory: ${{ matrix.plan }}
steps:
- uses: actions/checkout@v1
- name: Install protoc
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Get latest version of stable Rust
run: rustup update stable
- name: Lint code for quality and style with Clippy
Expand Down
Loading

0 comments on commit cb2d84d

Please sign in to comment.