From 8205bbf22176775755f394ff561e3c595555d85b Mon Sep 17 00:00:00 2001 From: ThetaSinner Date: Fri, 8 Mar 2024 18:29:57 +0000 Subject: [PATCH] Smoke test all scenarios --- .github/workflows/test.yaml | 20 ++++++++++++++++++-- scenarios/dht_sync_lag/README.md | 2 ++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b3fc3d83..da3d6d4d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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" diff --git a/scenarios/dht_sync_lag/README.md b/scenarios/dht_sync_lag/README.md index 8f40d196..1c1a2f2c 100644 --- a/scenarios/dht_sync_lag/README.md +++ b/scenarios/dht_sync_lag/README.md @@ -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