Skip to content

Commit d2a08cd

Browse files
authored
feat: Add comprehensive IPC benchmark dashboard with enhanced UI and performance (#83)
- Implement modular dashboard architecture with interactive visualizations - Add comprehensive data processing pipeline with caching and threading - Create intuitive UI with Summary and Time Series analysis tabs - Implement robust error handling and empty directory support - Add detailed documentation and parameter guidance - Enhance UI/UX with improved contrast, responsive design, and help system - Fix all linting issues and improve code quality with flake8 compliance - Add preset system for quick analysis configuration - Implement settings preservation and cache management - Support multiple IPC mechanisms: SharedMemory, UnixDomainSocket, PosixMessageQueue Key Features: - Interactive charts with Plotly integration - Real-time data filtering and analysis - Performance insights and statistical analysis - Comprehensive error messages and data validation - Professional dark theme with excellent accessibility - Modular design for easy maintenance and extension
1 parent e0ff7fa commit d2a08cd

9 files changed

Lines changed: 9709 additions & 0 deletions

File tree

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,21 @@ target
2525
*.json*
2626
*.log*
2727
*.test*
28+
29+
# Python
30+
venv/
31+
env/
32+
.env/
33+
.venv/
34+
ENV/
35+
env.bak/
36+
venv.bak/
37+
__pycache__/
38+
*.py[cod]
39+
*$py.class
40+
*.so
41+
.Python
42+
pip-log.txt
43+
pip-delete-this-directory.txt
44+
.coverage
45+
.pytest_cache/

CONFIG.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,95 @@ IPC_BENCHMARK_CONFIG=./default.json ipc-benchmark
189189
- Concurrency: 1-16 depending on system capacity
190190
- Buffer size: 32KB - 256KB
191191

192+
## Dashboard Output Requirements
193+
194+
The Rusty-Comms Dashboard requires specific output formats and parameters to provide full functionality. Missing required outputs will result in limited dashboard features.
195+
196+
### Required Output Parameters
197+
198+
For full dashboard compatibility, you **must** use both output parameters:
199+
200+
| Parameter | Purpose | Dashboard Impact |
201+
|-----------|---------|------------------|
202+
| `-o <directory>` | Generate summary JSON files | Enables Summary Analysis tab |
203+
| `--streaming-output-json` | Generate streaming data files | Enables Time Series Analysis tab |
204+
205+
### Example Dashboard-Ready Commands
206+
207+
```bash
208+
# Basic dashboard-compatible benchmark
209+
ipc-benchmark --mechanism SharedMemory --message-size 1024 \
210+
-o ./dashboard_data/ \
211+
--streaming-output-json
212+
213+
# Comprehensive comparison for dashboard
214+
ipc-benchmark -m uds shm tcp pmq \
215+
--message-size 1024 \
216+
--msg-count 50000 \
217+
-o ./results/ \
218+
--streaming-output-json \
219+
--continue-on-error
220+
221+
# Multi-size analysis
222+
for size in 64 256 1024 4096; do
223+
ipc-benchmark --mechanism SharedMemory \
224+
--message-size $size \
225+
-o ./dashboard_data/ \
226+
--streaming-output-json \
227+
--duration 10s
228+
done
229+
```
230+
231+
### Output File Structure
232+
233+
Dashboard-compatible runs will generate:
234+
235+
```
236+
results/
237+
├── sharedmemory_1024_summary.json # Summary statistics and throughput
238+
└── sharedmemory_1024_streaming.json # Per-message latency data
239+
```
240+
241+
### Dashboard Limitation Matrix
242+
243+
| ipc-benchmark Parameters | Summary Tab | Time Series Tab | Impact |
244+
|---------------------------|-------------|-----------------|--------|
245+
| `-o` only | ✅ Available | ❌ Missing | Limited functionality |
246+
| `--streaming-output-json` only | ❌ Missing | ✅ Available | No statistical summaries |
247+
| Both `-o` and `--streaming-output-json` | ✅ Available | ✅ Available | Full functionality |
248+
| Neither parameter | ❌ Missing | ❌ Missing | Dashboard incompatible |
249+
250+
### Troubleshooting Dashboard Data Issues
251+
252+
#### Missing Time Series Data
253+
```bash
254+
# Problem: Only used -o parameter
255+
ipc-benchmark -m shm -o results/
256+
257+
# Solution: Add streaming output
258+
ipc-benchmark -m shm -o results/ --streaming-output-json
259+
```
260+
261+
#### Missing Summary Data
262+
```bash
263+
# Problem: Only used streaming output
264+
ipc-benchmark -m shm --streaming-output-json
265+
266+
# Solution: Add summary output
267+
ipc-benchmark -m shm -o results/ --streaming-output-json
268+
```
269+
270+
#### No Dashboard Data
271+
```bash
272+
# Problem: No output parameters specified
273+
ipc-benchmark -m shm
274+
275+
# Solution: Use both required parameters
276+
ipc-benchmark -m shm -o results/ --streaming-output-json
277+
```
278+
279+
For dashboard setup and usage instructions, see [`utils/dashboard/README.md`](utils/dashboard/README.md).
280+
192281
## Performance Tuning
193282

194283
### System-Level Optimizations

README.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,32 @@ Mechanism: SharedMemory
415415
```
416416
*Note: The `Final JSON Results` line will appear in the "Output Files Written" section if the `--output-file` flag was used.*
417417
418+
## Result Analysis
419+
420+
### Interactive Dashboard
421+
422+
For comprehensive analysis and visualization of benchmark results, use the included **Performance Dashboard** - a web application designed for IPC performance analysis:
423+
424+
```bash
425+
# Start the interactive dashboard
426+
python utils/dashboard/dashboard.py --dir /path/to/results --host 0.0.0.0 --port 8050
427+
```
428+
**Analysis Workflows:**
429+
- **Summary Analysis**: Performance overview cards, head-to-head comparisons, and statistical breakdowns
430+
- **Time Series Analysis**: Temporal patterns, anomaly detection, and moving averages with 5 preset configurations
431+
- **Interactive Exploration**: Filter by mechanism/message size, drill down into specific test runs
432+
433+
**Key Features:**
434+
- **Advanced Visualizations**: Interactive time-series plots, statistical overlays, and comparative analysis
435+
- **Intelligent Insights**: AI-powered performance recommendations and mechanism comparisons
436+
- **Modern UI**: interface with preset configurations for different analysis scenarios
437+
- **High Performance**: Handles millions of data points with threaded processing and smart caching
438+
- **Export Capabilities**: Generate reports and capture insights for documentation
439+
440+
The dashboard automatically discovers all JSON and CSV output files in your results directory and provides powerful tools for understanding IPC performance characteristics across different scenarios.
441+
442+
For detailed dashboard documentation and setup instructions, see [`utils/dashboard/README.md`](utils/dashboard/README.md).
443+
418444
## Performance Considerations
419445

420446
### System Configuration
@@ -559,6 +585,112 @@ To help maintain branch quality and streamline development, the CI includes auto
559585

560586
- **Stale PR Notifier**: If a pull request becomes out-of-date with the `main` branch, a bot will post a comment to notify the author. The comment will include a list of recent commits to `main` to provide context.
561587

588+
## Dashboard Integration
589+
590+
The Rusty-Comms Dashboard provides powerful visualization and analysis capabilities for benchmark results. However, it requires specific output files to function properly.
591+
592+
### Prerequisites for Dashboard Usage
593+
594+
The dashboard requires **both** summary and streaming data files from ipc-benchmark:
595+
596+
- **Summary JSON**: Contains aggregated performance metrics and statistical analysis
597+
- **Streaming JSON**: Contains individual message latency data for time series analysis
598+
599+
### Required ipc-benchmark Parameters
600+
601+
To generate dashboard-compatible output, you **must** include both output parameters:
602+
603+
```bash
604+
# Minimum command for dashboard compatibility
605+
./ipc-benchmark --mechanism <MECHANISM> --message-size <SIZE> \
606+
-o results/ \
607+
--streaming-output-json \
608+
--continue-on-error
609+
610+
# Example with specific values
611+
./ipc-benchmark --mechanism SharedMemory --message-size 1024 \
612+
-o ./benchmark_results/ \
613+
--streaming-output-json \
614+
--duration 30s
615+
```
616+
617+
### File Output Expectations
618+
619+
After running with the required parameters, you should see these files:
620+
621+
```
622+
results/
623+
├── sharedmemory_1024_summary.json # Enables Summary Analysis
624+
└── sharedmemory_1024_streaming.json # Enables Time Series Analysis
625+
```
626+
627+
### Dashboard Parameter Reference
628+
629+
| Parameter | Required | Purpose | Dashboard Impact |
630+
|-----------|----------|---------|------------------|
631+
| `-o <dir>` | **Yes** | Output directory | Summary data location |
632+
| `--streaming-output-json` | **Yes** | Enable streaming data | Time series analysis |
633+
| `--mechanism <type>` | **Yes** | IPC mechanism | Data categorization |
634+
| `--message-size <bytes>` | **Yes** | Message size | Performance comparison |
635+
| `--duration <time>` | Recommended | Test duration | Data volume |
636+
| `--continue-on-error` | Recommended | Continue if one test fails | Complete dataset |
637+
638+
### Quick Start: Dashboard-Ready Benchmarks
639+
640+
#### Single Mechanism Test
641+
```bash
642+
./ipc-benchmark --mechanism SharedMemory \
643+
--message-size 1024 \
644+
-o ./dashboard_data/ \
645+
--streaming-output-json \
646+
--duration 30s
647+
```
648+
649+
#### Multi-Size Comparison Test
650+
```bash
651+
for size in 64 256 1024 4096; do
652+
./ipc-benchmark --mechanism SharedMemory \
653+
--message-size $size \
654+
-o ./dashboard_data/ \
655+
--streaming-output-json \
656+
--duration 10s
657+
done
658+
```
659+
660+
#### Multi-Mechanism Comparison
661+
```bash
662+
for mechanism in uds shm tcp pmq; do
663+
./ipc-benchmark --mechanism $mechanism \
664+
--message-size 1024 \
665+
-o ./dashboard_data/ \
666+
--streaming-output-json \
667+
--duration 15s
668+
done
669+
```
670+
671+
### Launch Dashboard
672+
```bash
673+
cd utils/dashboard
674+
python3 dashboard.py --dir ../../dashboard_data/
675+
```
676+
677+
### Troubleshooting Dashboard Issues
678+
679+
#### "No Data Available" Error
680+
**Cause**: Missing streaming data files
681+
**Solution**: Ensure ipc-benchmark runs with `--streaming-output-json`
682+
683+
#### Dashboard Shows Only Summary Data
684+
**Cause**: Missing streaming JSON files
685+
**Impact**: Time Series analysis will be unavailable
686+
**Solution**: Re-run benchmarks with streaming output enabled
687+
688+
#### Empty Directory on Startup
689+
**Cause**: No benchmark result files in the specified directory
690+
**Solution**: Run ipc-benchmark with the required parameters first, then start dashboard
691+
692+
For detailed dashboard documentation and advanced features, see [`utils/dashboard/README.md`](utils/dashboard/README.md).
693+
562694
## Contributing
563695

564696
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed contribution guidelines.

0 commit comments

Comments
 (0)