polish the rendering a bit, add a macro

This commit is contained in:
2025-12-16 23:20:34 +01:00
parent 11d9ebe2b6
commit cd790cbf7e
4 changed files with 232 additions and 101 deletions

View File

@@ -2,7 +2,7 @@
A lightweight, debug-only telemetry profiler for Rust applications. Shows thread activity and call stack hierarchy in real-time.
Inspired by RAD Telemetry - built in ~400 LOC with minimal dependencies.
Inspired by RAD Telemetry - built in ~1200 LOC with 'minimal' dependencies (for a Rust project).
## Features
@@ -15,10 +15,14 @@ Inspired by RAD Telemetry - built in ~400 LOC with minimal dependencies.
## Dependencies
Only 3 dependencies (~15 total including transitive):
Only 7 dependencies (~70 total including transitive):
- `minifb` - Window and framebuffer
- `crossbeam-channel` - Lock-free MPSC
- `once_cell` - Lazy statics
- `fontdue`
- `procmacro2`
- `syn`
- `quote`
## Usage
@@ -26,7 +30,7 @@ Only 3 dependencies (~15 total including transitive):
```toml
[dependencies]
teleprof = { path = "../teleprof" } # or from crates.io when published
teleprof = { path = "../teleprof" }
```
### In your code:
@@ -99,26 +103,6 @@ let work = || {
- **Separate window**: Doesn't interfere with your app's rendering
- **Simple API**: Just `span!("name")` and you're done
## Example Output
```
┌─────────────────────────────────────┐
│ Icicle Graph (Call Stack) │
│ ┌──────────────────────────┐ │
│ │ frame_work │ │
│ ├──────────┬───────────────┤ │
│ │ physics │ render │ │
│ ├────┬─────┤ │ │
│ │ w0 │ w1 │ │ │
│ └────┴─────┴───────────────┘ │
├─────────────────────────────────────┤
│ Thread Timeline │
│ Main: ████████████████████ │
│ Work 0: ░░██████░░░░░░░░░░░ │
│ Work 1: ░░░░░░██████░░░░░░░ │
└─────────────────────────────────────┘
```
## Examples
Run the included examples:
@@ -138,4 +122,4 @@ The bouncing ball example demonstrates:
## License
MIT / Apache-2.0 (choose whichever you prefer)
???