Skip to content

Commit 25bde3f

Browse files
committed
Recreate included scenarios
1 TxkB/s resembles load on mainnet right now, while 200 TxkB/s is more like the maximum deployed scenario.
1 parent e30b2e9 commit 25bde3f

File tree

9 files changed

+45
-29
lines changed

9 files changed

+45
-29
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ ui/public/traces/1xsummary.jsonl.gz filter=lfs diff=lfs merge=lfs -text
22
ui/public/traces/100xsummary.jsonl.gz filter=lfs diff=lfs merge=lfs -text
33
ui/public/traces/10xsummary.jsonl.gz filter=lfs diff=lfs merge=lfs -text
44
ui/public/traces/example.jsonl.gz filter=lfs diff=lfs merge=lfs -text
5+
ui/public/traces/small-1txkbs-nocpu.jsonl.gz filter=lfs diff=lfs merge=lfs -text
6+
ui/public/traces/small-200txkbs-nocpu.jsonl.gz filter=lfs diff=lfs merge=lfs -text

ui/README.md

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -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
4933
mkdir -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
5640
mkdir -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

ui/public/scenarios.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
{
22
"scenarios": [
33
{
4-
"name": "Small",
5-
"topology": "topologies/example.yaml",
4+
"name": "200 TxkB/s",
5+
"topology": "topologies/small.yaml",
66
"duration": 120,
7-
"trace": "traces/example-nocpu.jsonl"
7+
"trace": "traces/small-200txkbs-nocpu.jsonl.gz"
8+
},
9+
{
10+
"name": "1 TxkB/s",
11+
"topology": "topologies/small.yaml",
12+
"duration": 120,
13+
"trace": "traces/small-1txkbs-nocpu.jsonl.gz"
814
}
915
]
1016
}

ui/public/topologies/small.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../sim-rs/test_data/small.yaml

ui/public/traces/example.jsonl.gz

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:8dc61c3669751e395918f3b72e1a9b15fd18baa53d62456ef09ff23653a1a69c
3+
size 65564
2.73 MB
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:72f466f038d8af0c424d90379b7c722600475f78d162483aa25b53e79b3efa13
3+
size 10610371
33.4 MB
Binary file not shown.

0 commit comments

Comments
 (0)