Skip to content

Commit 1c02058

Browse files
authored
starknet_committer_cli: add readme (#9674)
1 parent 1cba40b commit 1c02058

File tree

1 file changed

+52
-0
lines changed
  • crates/starknet_committer_cli

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Starknet Committer CLI
2+
3+
## Description
4+
5+
A utility CLI to allow running a long term, persistent committer benchmark.
6+
7+
## Usage
8+
9+
### To use in a k8s env:
10+
11+
run the following from within the repo root dir.
12+
1. Build the CLI in release mode.
13+
```
14+
cargo build -p starknet_committer_cli --release
15+
```
16+
2. Build the docker image.
17+
Note: disable the .dockerignore file if it contains the "target" dir in it.
18+
```
19+
docker build -t starknet-committer-cli -f src/bin/benchmark_run/Dockerfile .
20+
```
21+
3. Push the image to an image registry.
22+
(First time: `docker tag starknet-committer-cli <REGISTRY_PATH>:<TAG>`)
23+
```
24+
docker push <REGISTRY_PATH>:<TAG>
25+
```
26+
4. Pull the image to a pod by editing the image key under "spec/containers", or delete the pod if it
27+
was already configured for the new image to be pulled.
28+
```
29+
kubectl edit statefulsets.apps <NAME>
30+
OR
31+
kubectl edit deployments.apps <NAME>
32+
```
33+
or
34+
```
35+
kubectl delete pod <POD>
36+
```
37+
38+
### To review the benchmark data:
39+
40+
1. Copy the created csv files from the pod to your local.
41+
```
42+
kubectl cp <POD_NAME>:<OUTPUT_CSV_DIR> <LOCAL_CSV_DIR>
43+
```
44+
2. Run the committer_benchmark_plotting script (check the different output options of the script).
45+
```
46+
python scripts/committer/committer_benchmark_plotting.py <LOCAL_CSV_DIR> -o <OUTPUT_CSV>
47+
```
48+
3. Plot a graph for the csv using the committer_benchmark_plotting script from a venv with the
49+
Plotly package (see output options).
50+
```
51+
python scripts/committer/committer_benchmark_plotting.py <OUTPUT_CSV>
52+
```

0 commit comments

Comments
 (0)