@@ -27,39 +27,43 @@ npm start
2727
2828## Add a scenario from sim-rs
2929
30- To prepare a scenario to visualize, add or update ` public/scenarios.json ` :
31-
32- ``` json
33- {
34- "scenarios" : [
35- {
36- "name" : " Example" ,
37- "topology" : " topologies/example.yaml" ,
38- "duration" : 300 ,
39- "trace" : " traces/example.jsonl" ,
40- "aggregated" : false
41- }
42- ]
43- }
44- ```
45-
46- Now add that topology to the public directory, for example:
30+ To prepare a scenario to visualize, find or add the topology to the public directory, for example:
4731
4832``` sh
4933mkdir -p public/topologies
50- ln -sr ../sim-rs/test_data/small.yaml public/topologies/example .yaml
34+ ln -sr ../sim-rs/test_data/small.yaml public/topologies/small .yaml
5135```
5236
53- And generate a trace to visualize using the built ` sim-rs ` :
37+ And generate a trace to visualize using the built ` sim-rs ` , for example using the CIP scenario :
5438
5539``` bash
5640mkdir -p public/traces
57- ../sim-rs/target/release/sim-cli -p ../analysis/sims/cip/experiments/NA,0.200/config.yaml public/topologies/example.yaml public/traces/example.jsonl -s 120
41+ cat ../analysis/sims/cip/experiments/NA,0.200/config.yaml \
42+ | jq ' ."tx-start-time" = 20' > public/traces/config-200txkbs.json
43+ ../sim-rs/target/release/sim-cli -p public/traces/config-200txkbs.json public/topologies/small.yaml public/traces/small-200txkbs.jsonl -s 120
5844```
5945
60- In case you want to store it, use gzip and git lfs:
46+ You might want to filter out ` Cpu ` events (not visualized) and, in case you want to store it, use gzip and git lfs:
6147
6248``` bash
63- gzip public/traces/examples.jsonl
64- git lfs track public/traces/examples.jsonl.gz
49+ grep -v ' Cpu' < public/traces/small-200txkbs.jsonl > public/traces/small-200txkbs-nocpu.jsonl
50+ gzip public/traces/small-200txkbs-nocpu.jsonl
51+ git lfs track public/traces/small-200txkbs-nocpu.jsonl.gz
6552```
53+
54+ Then update ` public/scenarios.json ` accordingly:
55+
56+ ``` json
57+ {
58+ "scenarios" : [
59+ {
60+ "name" : " 200 TxkB/s" ,
61+ "topology" : " topologies/small.yaml" ,
62+ "duration" : 120 ,
63+ "trace" : " traces/small-200txkbs-nocpu.jsonl.gz"
64+ }
65+ ]
66+ }
67+ ```
68+
69+ Now add that
0 commit comments