Skip to content

Commit

Permalink
Smoke test all scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
ThetaSinner committed Mar 8, 2024
1 parent 0e0c88f commit 8205bbf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,30 @@ jobs:
run: |
nix develop --command bash -c "cargo test"
- name: Smoke test
- name: Smoke test - zome_call_single_value
run: |
# Start a sandbox conductor and run it in the background
nix develop --command bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
# Run a single scenario for 5 seconds
# Run the scenario for 5 seconds
nix develop --command bash -c "RUST_LOG=info cargo run --package zome_call_single_value -- --connection-string ws://localhost:8888 --duration 5 --no-progress --no-metrics"
- name: Smoke test - single_write_many_read
run: |
# Start a sandbox conductor and run it in the background
nix develop --command bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
# Run the scenario for 5 seconds
nix develop --command bash -c "RUST_LOG=info cargo run --package single_write_many_read -- --connection-string ws://localhost:8888 --duration 5 --no-progress --no-metrics"
- name: Smoke test - single_write_many_read
run: |
# Start a sandbox conductor and run it in the background
nix develop --command bash -c "hc s clean && echo "1234" | hc s --piped create && echo "1234" | hc s --piped -f 8888 run &"
# Run the scenario for 5 seconds
nix develop --command bash -c "RUST_LOG=info cargo run --package dht_sync_lag -- --connection-string ws://localhost:8888 --agents 2 --behaviour write:1 --behaviour record_lag:1 --duration 5 --no-progress --no-metrics"

- name: Check scripts
run: |
nix develop --command bash -c "shellcheck scripts/*.sh"
2 changes: 2 additions & 0 deletions scenarios/dht_sync_lag/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

This scenario has two roles:
- _write_: A simple job that just creates entries with a timestamp field. Those entries are linked to a known base hash.
For each write, the metric `ws.custom.dht_sync_sent_count` is incremented.
- _record_lag_: A job that repeatedly queries for links from the known base hash. It keeps track of records that it has seen
and when a new record is found, it calculates the time difference between the timestamp of the new record and the current time.
That time difference is then recorded as a custom metric called `wt.custom.dht_sync_lag`.
After each behaviour loop the metric `ws.custom.dht_sync_recv_count` is incremented.

### Suggested command

Expand Down

0 comments on commit 8205bbf

Please sign in to comment.