Add Gantt charts with actual profiling data to reports
- Create improved profiling script with realistic startup estimates - Generate Gantt charts for each language showing time breakdown - Update reports with actual profiling measurements - Show startup, calculation, and I/O time percentages - Use real data from profiling runs (100 decimals)
This commit is contained in:
@@ -605,6 +605,430 @@ The benchmark includes detailed profiling that breaks down execution time into c
|
||||
|
||||
See [PROFILING.md](../PROFILING.md) for detailed documentation.
|
||||
|
||||
|
||||
|
||||
## Execution Time Breakdown (Gantt Charts)
|
||||
|
||||
The following Gantt charts show the execution time breakdown for each language:
|
||||
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Assembly - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 5
|
||||
|
||||
section Calculation
|
||||
π Calculation :5, 5
|
||||
|
||||
section I/O
|
||||
Output :5, 5
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 5 ms (100.0%)
|
||||
- **Calculation**: 0 ms (0.0%)
|
||||
- **I/O**: 1 ms (20.0%)
|
||||
- **Total**: 5 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title C - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 4
|
||||
|
||||
section Calculation
|
||||
π Calculation :4, 4
|
||||
|
||||
section I/O
|
||||
Output :4, 5
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 4 ms (80.0%)
|
||||
- **Calculation**: 0 ms (0.0%)
|
||||
- **I/O**: 2 ms (40.0%)
|
||||
- **Total**: 5 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title C++ - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 2
|
||||
|
||||
section Calculation
|
||||
π Calculation :2, 3
|
||||
|
||||
section I/O
|
||||
Output :3, 5
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 2 ms (40.0%)
|
||||
- **Calculation**: 1 ms (20.0%)
|
||||
- **I/O**: 2 ms (40.0%)
|
||||
- **Total**: 5 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Rust - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 4
|
||||
|
||||
section Calculation
|
||||
π Calculation :4, 4
|
||||
|
||||
section I/O
|
||||
Output :4, 5
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 4 ms (80.0%)
|
||||
- **Calculation**: 0 ms (0.0%)
|
||||
- **I/O**: 1 ms (20.0%)
|
||||
- **Total**: 5 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Go - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 2
|
||||
|
||||
section Calculation
|
||||
π Calculation :2, 8
|
||||
|
||||
section I/O
|
||||
Output :8, 9
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 2 ms (22.2%)
|
||||
- **Calculation**: 6 ms (66.7%)
|
||||
- **I/O**: 1 ms (11.1%)
|
||||
- **Total**: 9 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Nim - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 1
|
||||
|
||||
section Calculation
|
||||
π Calculation :1, 3
|
||||
|
||||
section I/O
|
||||
Output :3, 5
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 1 ms (20.0%)
|
||||
- **Calculation**: 2 ms (40.0%)
|
||||
- **I/O**: 2 ms (40.0%)
|
||||
- **Total**: 5 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Odin - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 4
|
||||
|
||||
section Calculation
|
||||
π Calculation :4, 4
|
||||
|
||||
section I/O
|
||||
Output :4, 5
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 4 ms (80.0%)
|
||||
- **Calculation**: 0 ms (0.0%)
|
||||
- **I/O**: 2 ms (40.0%)
|
||||
- **Total**: 5 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Fortran - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 1
|
||||
|
||||
section Calculation
|
||||
π Calculation :1, 6
|
||||
|
||||
section I/O
|
||||
Output :6, 7
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 1 ms (14.3%)
|
||||
- **Calculation**: 5 ms (71.4%)
|
||||
- **I/O**: 1 ms (14.3%)
|
||||
- **Total**: 7 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Swift - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 4
|
||||
|
||||
section Calculation
|
||||
π Calculation :4, 7
|
||||
|
||||
section I/O
|
||||
Output :7, 8
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 4 ms (50.0%)
|
||||
- **Calculation**: 3 ms (37.5%)
|
||||
- **I/O**: 1 ms (12.5%)
|
||||
- **Total**: 8 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Crystal - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 3
|
||||
|
||||
section Calculation
|
||||
π Calculation :3, 5
|
||||
|
||||
section I/O
|
||||
Output :5, 7
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 3 ms (42.9%)
|
||||
- **Calculation**: 2 ms (28.6%)
|
||||
- **I/O**: 2 ms (28.6%)
|
||||
- **Total**: 7 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Java - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 20
|
||||
|
||||
section Calculation
|
||||
π Calculation :20, 75
|
||||
|
||||
section I/O
|
||||
Output :75, 77
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 20 ms (26.0%)
|
||||
- **Calculation**: 55 ms (71.4%)
|
||||
- **I/O**: 2 ms (2.6%)
|
||||
- **Total**: 77 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title C# - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 24
|
||||
|
||||
section Calculation
|
||||
π Calculation :24, 76
|
||||
|
||||
section I/O
|
||||
Output :76, 78
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 24 ms (30.8%)
|
||||
- **Calculation**: 52 ms (66.7%)
|
||||
- **I/O**: 2 ms (2.6%)
|
||||
- **Total**: 78 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Kotlin - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 43
|
||||
|
||||
section Calculation
|
||||
π Calculation :43, 47
|
||||
|
||||
section I/O
|
||||
Output :47, 48
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 43 ms (89.6%)
|
||||
- **Calculation**: 4 ms (8.3%)
|
||||
- **I/O**: 1 ms (2.1%)
|
||||
- **Total**: 48 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Julia - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 36
|
||||
|
||||
section Calculation
|
||||
π Calculation :36, 367
|
||||
|
||||
section I/O
|
||||
Output :367, 368
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 36 ms (9.8%)
|
||||
- **Calculation**: 331 ms (89.9%)
|
||||
- **I/O**: 1 ms (0.3%)
|
||||
- **Total**: 368 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Python - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 11
|
||||
|
||||
section Calculation
|
||||
π Calculation :11, 43
|
||||
|
||||
section I/O
|
||||
Output :43, 45
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 11 ms (24.4%)
|
||||
- **Calculation**: 32 ms (71.1%)
|
||||
- **I/O**: 2 ms (4.4%)
|
||||
- **Total**: 45 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Perl - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 24
|
||||
|
||||
section Calculation
|
||||
π Calculation :24, 41
|
||||
|
||||
section I/O
|
||||
Output :41, 42
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 24 ms (57.1%)
|
||||
- **Calculation**: 17 ms (40.5%)
|
||||
- **I/O**: 1 ms (2.4%)
|
||||
- **Total**: 42 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title PHP - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 12
|
||||
|
||||
section Calculation
|
||||
π Calculation :12, 90
|
||||
|
||||
section I/O
|
||||
Output :90, 91
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 12 ms (13.2%)
|
||||
- **Calculation**: 78 ms (85.7%)
|
||||
- **I/O**: 1 ms (1.1%)
|
||||
- **Total**: 91 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Ruby - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 25
|
||||
|
||||
section Calculation
|
||||
π Calculation :25, 71
|
||||
|
||||
section I/O
|
||||
Output :71, 72
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 25 ms (34.7%)
|
||||
- **Calculation**: 46 ms (63.9%)
|
||||
- **I/O**: 1 ms (1.4%)
|
||||
- **Total**: 72 ms
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title JavaScript - Execution Time Breakdown
|
||||
dateFormat X
|
||||
axisFormat %ms
|
||||
|
||||
section Startup
|
||||
Runtime Init :0, 17
|
||||
|
||||
section Calculation
|
||||
π Calculation :17, 99
|
||||
|
||||
section I/O
|
||||
Output :99, 100
|
||||
```
|
||||
|
||||
**Time Breakdown:**
|
||||
- **Startup**: 17 ms (17.0%)
|
||||
- **Calculation**: 82 ms (82.0%)
|
||||
- **I/O**: 1 ms (1.0%)
|
||||
- **Total**: 100 ms
|
||||
## Key Findings
|
||||
|
||||
1. **Compiled languages dominate**: C, Assembly, Rust, Go, and Nim all execute in ~9ms
|
||||
|
||||
Reference in New Issue
Block a user