Skip to content

Commit 1e63af1

Browse files
committed
Add spaces to markdown table separators for readability
Post-processes generated markdown to transform |---| into | --- | for cleaner rendering in terminals and editors. https://claude.ai/code/session_01VtVRPfBE8KL58Zk44z5V3X
1 parent 2242856 commit 1e63af1

2 files changed

Lines changed: 25 additions & 10 deletions

File tree

packages/cli/src/executor/profile.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,22 @@ fn generate_report(
13651365

13661366
md.push('\n');
13671367

1368-
md
1368+
// Add spaces to table separators for readability: |---|---| → | --- | --- |
1369+
let mut result = String::new();
1370+
let mut chars = md.chars().peekable();
1371+
while let Some(c) = chars.next() {
1372+
if c == '|' {
1373+
// Check for |---
1374+
let rest: String = chars.clone().take(3).collect();
1375+
if rest == "---" {
1376+
result.push_str("| --- ");
1377+
chars.nth(2); // skip the three dashes
1378+
continue;
1379+
}
1380+
}
1381+
result.push(c);
1382+
}
1383+
result
13691384
}
13701385

13711386
// ---------------------------------------------------------------------------

packages/cli/src/executor/snapshots/envio__executor__profile__tests__snapshot_report_from_prometheus_metrics.snap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
source: packages/cli/src/executor/profile.rs
3-
assertion_line: 1600
3+
assertion_line: 1615
44
expression: report
55
---
66
# Envio Indexer Profile
@@ -10,7 +10,7 @@ expression: report
1010
**Envio version**: 0.0.1-dev
1111

1212
| Metric | Value |
13-
|---|---|
13+
| --- | --- |
1414
| Total Events Processed | 10,041 |
1515
| Total Batches | 4 |
1616
| Max Batch Size | 5,000 |
@@ -20,7 +20,7 @@ expression: report
2020
Cumulative time spent in each processing stage.
2121

2222
| Stage | Time |
23-
|---|---|
23+
| --- | --- |
2424
| Loaders (preload) | 66ms |
2525
| Handlers (processing) | 35ms |
2626
| DB Writes | 145ms |
@@ -33,30 +33,30 @@ Pipeline split: Loaders 27% | Handlers 14% | DB Writes 59%
3333
Per-handler timing sorted by total time (handler + preload).
3434

3535
| Handler | Handler Time | Calls | Preload Time | Preload Calls |
36-
|---|---|---|---|---|
36+
| --- | --- | --- | --- | --- |
3737
| ERC20 Transfer | 19ms | 6,607 | 65ms | 6,607 |
3838
| ERC20 Approval | 8ms | 3,434 | 29ms | 3,434 |
3939

4040
## Chain Progress
4141

4242
| Chain | Block | Events | Latency | Synced |
43-
|---|---|---|---|---|
43+
| --- | --- | --- | --- | --- |
4444
| 1 | 18,732,689 | 10,041 | 34679m 7s | No |
4545

4646
## Fetching Performance
4747

4848
Per-chain data fetching statistics.
4949

5050
| Chain | Fetch Time | Parse Time | Fetches | Events Fetched | Blocks Covered | Avg Events/Fetch |
51-
|---|---|---|---|---|---|---|
51+
| --- | --- | --- | --- | --- | --- | --- |
5252
| 1 | 19.4s | 138ms | 2 | 10,041 | 132,690 | 5020 |
5353

5454
## Indexing Status
5555

5656
Per-chain indexing configuration and timing.
5757

5858
| Chain | Known Height | Buffer | Concurrency | Partitions | Addresses | Idle Time | Waiting | Querying |
59-
|---|---|---|---|---|---|---|---|---|
59+
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
6060
| 1 | 24,592,713 | 0 | 6/10 | 1 | 1 | 116ms | 1.7s | 19.5s |
6161

6262
Target buffer size: 50,000
@@ -66,13 +66,13 @@ Target buffer size: 50,000
6666
Sorted by processing time (descending).
6767

6868
| Operation | Time | Avg/Query | Calls | Batched % | Found % |
69-
|---|---|---|---|---|---|
69+
| --- | --- | --- | --- | --- | --- |
7070
| Account.get | 27ms | 7ms | 2,477 | 99.8% | 10.8% |
7171

7272
## System Resources
7373

7474
| Resource | Value |
75-
|---|---|
75+
| --- | --- |
7676
| CPU Usage | - |
7777
| Memory (RSS) | - |
7878
| Heap Usage | - |

0 commit comments

Comments
 (0)