Utkarsh Saxena
d30fd562e8
[LifetimeSafety] Enhance benchmark script for new sub analyses (#149577)
Enhanced the lifetime safety analysis benchmark script with more
detailed performance metrics and a new nested loop test case. This is a
worst case for loan expiry analysis.
### What changed?
- Added a new test case `nested_loops` that generates code with N levels
of nested loops to test how analysis performance scales with loop
nesting depth
- Improved the trace file analysis to extract durations for sub-phases
of the lifetime analysis (FactGenerator, LoanPropagation, ExpiredLoans)
- Enhanced the markdown report generation to include:
- Relative timing results as percentages of total Clang time
- More detailed complexity analysis for each analysis phase
Report
# Lifetime Analysis Performance Report
> Generated on: 2025-08-18 13:29:57
---
## Test Case: Pointer Cycle in Loop
**Timing Results:**
| N (Input Size) | Total Time | Analysis Time (%) | Fact Generator (%) |
Loan Propagation (%) | Expired Loans (%) |
|:---------------|-----------:|------------------:|-------------------:|---------------------:|------------------:|
| 10 | 10.75 ms | 24.61% | 0.00% | 24.38% | 0.00% |
| 25 | 64.98 ms | 86.08% | 0.00% | 86.02% | 0.00% |
| 50 | 709.37 ms | 98.53% | 0.00% | 98.51% | 0.00% |
| 75 | 3.13 s | 99.63% | 0.00% | 99.63% | 0.00% |
| 100 | 9.44 s | 99.85% | 0.00% | 99.84% | 0.00% |
| 150 | 45.31 s | 99.96% | 0.00% | 99.96% | 0.00% |
**Complexity Analysis:**
| Analysis Phase | Complexity O(n<sup>k</sup>) |
|:------------------|:--------------------------|
| Total Analysis | O(n<sup>3.87</sup> ± 0.01) |
| FactGenerator | (Negligible) |
| LoanPropagation | O(n<sup>3.87</sup> ± 0.01) |
| ExpiredLoans | (Negligible) |
---
## Test Case: CFG Merges
**Timing Results:**
| N (Input Size) | Total Time | Analysis Time (%) | Fact Generator (%) |
Loan Propagation (%) | Expired Loans (%) |
|:---------------|-----------:|------------------:|-------------------:|---------------------:|------------------:|
| 10 | 8.54 ms | 0.00% | 0.00% | 0.00% | 0.00% |
| 50 | 40.85 ms | 65.09% | 0.00% | 64.61% | 0.00% |
| 100 | 207.70 ms | 93.58% | 0.00% | 93.46% | 0.00% |
| 200 | 1.54 s | 98.82% | 0.00% | 98.78% | 0.00% |
| 400 | 12.04 s | 99.72% | 0.00% | 99.71% | 0.01% |
| 800 | 96.73 s | 99.94% | 0.00% | 99.94% | 0.00% |
**Complexity Analysis:**
| Analysis Phase | Complexity O(n<sup>k</sup>) |
|:------------------|:--------------------------|
| Total Analysis | O(n<sup>3.01</sup> ± 0.00) |
| FactGenerator | (Negligible) |
| LoanPropagation | O(n<sup>3.01</sup> ± 0.00) |
| ExpiredLoans | (Negligible) |
---
## Test Case: Deeply Nested Loops
**Timing Results:**
| N (Input Size) | Total Time | Analysis Time (%) | Fact Generator (%) |
Loan Propagation (%) | Expired Loans (%) |
|:---------------|-----------:|------------------:|-------------------:|---------------------:|------------------:|
| 10 | 8.25 ms | 0.00% | 0.00% | 0.00% | 0.00% |
| 50 | 27.25 ms | 51.87% | 0.00% | 45.71% | 5.93% |
| 100 | 113.42 ms | 82.48% | 0.00% | 72.74% | 9.62% |
| 200 | 730.05 ms | 95.24% | 0.00% | 83.95% | 11.25% |
| 400 | 5.40 s | 98.74% | 0.01% | 87.05% | 11.68% |
| 800 | 41.86 s | 99.62% | 0.00% | 87.77% | 11.84% |
**Complexity Analysis:**
| Analysis Phase | Complexity O(n<sup>k</sup>) |
|:------------------|:--------------------------|
| Total Analysis | O(n<sup>2.97</sup> ± 0.00) |
| FactGenerator | (Negligible) |
| LoanPropagation | O(n<sup>2.96</sup> ± 0.00) |
| ExpiredLoans | O(n<sup>2.97</sup> ± 0.00) |
---
2025-08-18 19:07:41 +00:00
..
2025-03-28 11:26:28 +01:00
2025-03-31 08:44:28 +02:00
2024-05-23 12:56:16 +02:00
2025-07-15 15:12:15 -07:00
2024-01-31 13:55:31 -08:00
2025-07-28 18:02:56 +02:00
2025-08-01 12:31:56 -04:00
2025-06-30 12:59:51 +02:00
2025-05-21 13:33:51 +02:00
2024-05-06 10:36:19 -07:00
2024-05-06 10:36:19 -07:00
2025-07-28 18:02:56 +02:00
2025-08-18 19:07:41 +00:00
2024-05-08 07:35:47 -07:00
2025-06-30 12:59:51 +02:00
2025-02-26 13:57:33 +01:00
2024-01-27 22:20:08 -08:00
2024-05-06 10:36:19 -07:00
2025-06-30 12:59:51 +02:00
2025-02-26 13:57:33 +01:00
2024-06-28 10:17:27 +02:00
2025-05-12 10:56:29 +02:00
2024-03-25 15:24:03 +01:00
2024-03-25 15:24:03 +01:00
2025-07-30 14:04:55 +02:00
2024-03-25 15:24:03 +01:00
2025-08-16 02:04:31 -03:00
2025-02-26 13:57:33 +01:00
2025-02-26 13:57:33 +01:00
2023-08-28 12:13:42 -04:00
2025-06-30 12:59:51 +02:00
2024-10-04 16:12:29 +03:00
2024-09-26 14:00:13 +02:00
2024-03-06 16:42:31 +01:00
2023-07-19 09:01:41 +02:00
2023-09-20 06:11:39 -05:00
2025-06-11 11:25:24 -05:00
2024-02-11 19:43:34 +01:00
2023-08-18 10:47:05 +02:00
2023-09-29 20:02:38 +02:00
2023-08-18 10:47:05 +02:00
2024-08-28 11:30:18 +02:00
2024-08-28 11:30:18 +02:00
2024-06-03 14:23:58 +02:00
2024-06-03 14:23:58 +02:00
2024-06-03 14:23:58 +02:00
2023-08-28 12:13:42 -04:00
2023-09-07 13:35:50 -07:00
2025-06-26 14:19:30 +02:00
2024-01-15 12:12:09 -06:00
2024-07-04 13:46:22 +02:00
2024-01-24 11:22:43 +01:00
2024-11-27 09:41:12 +01:00
2025-06-17 11:51:09 +02:00
2025-08-01 19:29:06 +08:00
2025-05-13 10:24:02 -07:00
2025-04-20 16:14:41 +02:00
2025-04-20 16:14:41 +02:00
2024-07-23 08:39:11 +02:00
2025-07-03 08:42:10 +02:00
2025-07-03 08:42:10 +02:00
2023-08-28 12:13:42 -04:00
2025-02-26 13:57:33 +01:00
2025-03-03 10:44:05 +01:00
2024-09-30 09:16:27 +02:00
2023-08-28 12:13:42 -04:00
2025-04-07 09:46:03 +02:00
2024-05-30 07:56:58 -05:00
2024-08-23 15:38:21 -04:00
2025-07-19 03:44:14 -03:00
2023-08-28 12:13:42 -04:00
2024-11-29 08:23:08 +01:00
2025-06-30 12:59:51 +02:00
2025-03-03 10:44:05 +01:00
2025-01-18 19:16:33 +01:00
2025-07-07 20:18:48 +02:00
2025-05-12 14:19:44 +02:00
2023-10-16 14:51:05 +02:00
2025-02-11 12:54:30 +00:00
2025-06-26 14:19:30 +02:00
2025-07-07 13:46:30 +02:00
2024-09-19 10:04:47 +02:00
2025-03-17 08:23:31 +01:00
2025-02-26 13:57:33 +01:00
2024-11-29 09:19:33 +01:00
2025-02-26 13:57:33 +01:00
2025-06-30 12:59:51 +02:00
2025-06-30 12:59:51 +02:00
2025-06-30 12:59:51 +02:00
2025-06-30 12:59:51 +02:00
2025-06-30 12:59:51 +02:00
2025-06-30 12:59:51 +02:00
2024-09-25 10:43:02 -04:00
2025-06-30 12:59:51 +02:00
2024-03-06 17:01:30 +01:00
2023-08-28 12:13:42 -04:00
2025-08-05 17:28:49 +02:00
2024-03-22 12:04:44 +01:00
2024-09-26 14:00:13 +02:00
2025-03-21 13:20:52 -03:00
2024-11-27 14:27:31 +01:00
2025-03-26 16:07:51 +01:00
2024-05-22 12:37:27 +08:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2024-09-26 14:00:13 +02:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2025-06-30 12:59:51 +02:00
2023-07-07 13:24:33 +02:00
2025-07-18 09:34:15 +02:00
2025-07-18 09:34:15 +02:00
2024-10-01 11:33:06 +02:00
2025-02-07 08:01:39 +01:00
2025-07-28 18:02:56 +02:00
2025-05-12 14:19:44 +02:00
2023-08-28 12:13:42 -04:00
2025-08-01 16:39:56 +02:00
2025-01-03 11:17:16 +01:00
2025-05-25 11:59:50 +02:00
2025-05-25 11:59:50 +02:00
2024-06-17 23:37:34 +08:00
2023-11-21 13:34:03 +01:00
2023-11-21 13:34:03 +01:00
2023-11-21 13:34:03 +01:00
2025-05-23 09:26:31 +02:00
2023-11-21 13:34:03 +01:00
2024-03-19 07:55:49 -07:00
2025-05-13 10:24:02 -07:00
2025-07-19 03:44:14 -03:00
2025-05-12 14:19:44 +02:00
2025-01-06 12:45:31 +01:00
2025-01-06 12:45:31 +01:00
2025-03-26 09:24:18 +01:00
2023-09-01 21:03:16 +08:00
2025-02-26 13:57:33 +01:00
2024-07-24 13:15:08 +02:00
2024-07-24 13:15:08 +02:00
2025-02-06 16:09:14 +01:00
2025-05-15 19:29:58 +02:00
2025-02-06 16:09:14 +01:00
2025-05-26 20:27:42 +02:00
2025-05-14 18:28:44 +02:00
2023-08-28 12:13:42 -04:00
2025-07-28 18:02:56 +02:00
2024-03-25 12:43:51 +01:00
2025-06-24 20:18:15 +02:00
2024-03-22 11:50:34 +01:00
2024-05-13 13:43:35 +02:00
2024-09-26 14:00:13 +02:00
2024-09-26 14:00:13 +02:00
2023-07-11 08:50:59 +02:00
2025-07-28 18:02:56 +02:00
2025-06-30 12:59:51 +02:00
2025-06-30 12:59:51 +02:00
2025-02-26 13:57:33 +01:00
2024-08-28 08:36:59 +02:00
2025-02-06 17:45:42 +01:00
2024-10-18 13:51:20 +02:00
2025-06-30 12:59:51 +02:00
2025-06-30 12:59:51 +02:00
2025-02-28 17:42:26 +01:00
2023-08-28 12:13:42 -04:00
2025-01-18 19:16:33 +01:00
2023-10-02 09:54:22 -05:00
2023-11-24 10:02:56 +01:00
2024-04-17 08:02:49 +02:00
2025-03-24 13:51:11 +01:00
2023-07-03 16:13:47 +08:00
2023-11-03 17:10:31 +08:00
2025-03-26 16:03:43 +01:00
2024-07-23 08:39:11 +02:00
2025-02-17 15:35:40 +01:00
2025-05-07 15:55:52 -07:00
2024-11-29 09:19:33 +01:00
2023-08-28 12:02:48 +02:00
2025-02-26 13:57:33 +01:00
2025-03-26 16:03:43 +01:00
2025-06-25 16:15:01 +02:00
2023-10-20 13:10:03 -04:00
2025-06-30 12:59:51 +02:00
2025-02-22 01:19:01 +08:00
2025-06-26 14:19:30 +02:00
2025-02-17 11:12:55 +01:00
2025-02-12 11:56:02 +01:00
2025-05-12 10:56:29 +02:00
2024-08-28 08:36:59 +02:00
2025-05-12 10:56:29 +02:00
2023-10-26 21:11:51 +08:00
2025-06-30 12:59:51 +02:00
2025-03-31 08:44:28 +02:00
2025-07-28 18:02:56 +02:00
2025-07-28 18:02:56 +02:00
2025-08-08 20:48:50 +02:00
2024-07-24 13:15:08 +02:00
2025-07-28 18:02:56 +02:00
2025-07-28 18:02:56 +02:00
2025-07-28 18:02:56 +02:00
2025-07-28 18:02:56 +02:00
2024-07-24 13:15:08 +02:00
2025-07-28 18:02:56 +02:00
2024-09-26 14:00:13 +02:00
2025-07-28 18:02:56 +02:00
2025-07-28 18:02:56 +02:00
2024-05-15 10:53:54 +02:00
2025-06-30 12:59:51 +02:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2025-02-06 17:45:42 +01:00
2024-03-06 16:32:14 +01:00
2025-02-26 13:57:33 +01:00
2025-03-26 09:24:18 +01:00
2025-03-23 09:49:37 +01:00
2024-07-24 13:15:08 +02:00
2024-09-03 10:31:36 +02:00
2023-08-28 12:13:42 -04:00
2024-05-06 10:36:19 -07:00
2025-02-28 17:42:26 +01:00
2025-07-28 18:02:56 +02:00
2024-09-16 19:44:13 +03:00
2025-07-28 18:02:56 +02:00
2025-07-28 18:02:56 +02:00
2025-07-28 18:02:56 +02:00
2023-08-28 12:13:42 -04:00
2025-01-18 19:16:33 +01:00
2023-07-18 07:03:32 +02:00
2023-07-18 07:03:32 +02:00
2025-01-18 19:16:33 +01:00
2023-08-28 12:13:42 -04:00
2025-01-30 12:48:09 +01:00
2023-08-28 12:13:42 -04:00
2025-06-30 12:59:51 +02:00
2023-07-06 22:36:51 +08:00
2024-09-09 03:47:39 -05:00
2024-08-27 14:41:52 +02:00
2024-08-27 14:41:52 +02:00
2024-09-06 15:55:16 +02:00
2024-02-13 14:57:55 -08:00
2023-08-28 12:13:42 -04:00
2025-06-30 12:59:51 +02:00
2023-08-28 12:13:42 -04:00
2024-02-13 14:57:55 -08:00
2025-06-30 12:59:51 +02:00
2025-02-26 13:57:33 +01:00
2023-08-28 12:13:42 -04:00
2024-05-06 10:36:19 -07:00
2024-10-31 17:02:28 +01:00
2025-06-05 11:28:16 +02:00
2025-07-30 15:14:06 +02:00
2024-07-24 13:15:08 +02:00
2023-08-28 12:13:42 -04:00
2025-01-18 19:16:33 +01:00
2025-01-18 19:16:33 +01:00
2025-06-30 12:59:51 +02:00
2024-09-30 09:16:27 +02:00
2024-10-11 11:58:14 +02:00
2025-03-26 09:24:18 +01:00
2025-07-03 09:08:00 -05:00
2025-06-24 14:50:14 +02:00
2023-08-28 12:13:42 -04:00
2023-10-16 14:51:05 +02:00
2025-05-12 14:19:44 +02:00
2024-12-28 11:09:29 +01:00
2025-04-20 17:32:42 +02:00
2025-04-23 06:55:10 -04:00
2025-07-03 13:36:30 +00:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2025-06-26 14:19:30 +02:00
2025-01-06 12:45:31 +01:00
2024-05-06 10:36:19 -07:00
2024-06-04 10:02:38 +02:00
2024-10-09 11:39:56 +02:00
2024-09-26 14:00:13 +02:00
2025-06-26 14:19:30 +02:00
2024-05-06 10:36:19 -07:00
2023-08-28 12:13:42 -04:00
2025-02-28 15:48:31 +01:00
2025-07-28 18:02:56 +02:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2023-09-13 17:43:33 -07:00
2023-08-28 12:13:42 -04:00
2024-05-07 13:06:11 +02:00
2025-02-06 17:45:42 +01:00
2025-06-30 12:59:51 +02:00
2023-11-24 16:23:56 +08:00
2023-09-24 11:58:14 -03:00
2025-07-28 18:02:56 +02:00
2023-08-28 12:13:42 -04:00
2024-05-22 12:11:18 +02:00
2024-05-22 12:11:18 +02:00
2024-07-29 08:12:22 +02:00
2024-11-29 08:23:08 +01:00
2024-05-06 10:36:19 -07:00
2024-05-06 10:36:19 -07:00
2024-10-23 10:46:36 +02:00
2025-02-26 13:57:33 +01:00
2024-08-28 08:36:59 +02:00
2025-07-28 18:02:56 +02:00
2025-02-16 16:58:43 +01:00
2025-02-11 12:54:30 +00:00
2023-10-16 14:51:05 +02:00
2023-10-16 14:51:05 +02:00
2023-10-16 14:51:05 +02:00
2023-10-16 14:51:05 +02:00
2023-10-16 14:51:05 +02:00
2023-10-16 14:51:05 +02:00
2025-07-30 14:04:55 +02:00
2025-07-19 03:44:14 -03:00
2023-10-16 14:51:05 +02:00
2023-10-16 14:51:05 +02:00
2025-07-19 03:44:14 -03:00
2023-10-16 14:51:05 +02:00
2024-02-21 09:18:01 +01:00
2023-10-16 14:51:05 +02:00
2023-10-16 14:51:05 +02:00
2025-03-11 10:23:03 -07:00
2023-10-16 14:51:05 +02:00
2023-10-16 14:51:05 +02:00
2025-07-19 03:44:14 -03:00
2025-07-19 03:44:14 -03:00
2023-10-16 14:51:05 +02:00
2023-10-16 14:51:05 +02:00
2025-07-28 18:02:56 +02:00
2023-11-21 14:02:22 +01:00
2024-11-29 09:19:33 +01:00
2024-11-29 09:19:33 +01:00
2024-11-14 16:28:37 +01:00
2025-08-04 14:56:33 +02:00
2025-08-04 14:56:33 +02:00
2025-08-04 14:56:33 +02:00
2024-04-30 09:01:45 +02:00
2024-04-30 09:01:45 +02:00
2024-09-18 12:22:02 +02:00
2024-04-30 09:01:45 +02:00
2024-04-30 09:01:45 +02:00
2024-04-30 09:01:45 +02:00
2024-09-18 12:22:02 +02:00
2024-06-24 16:34:36 +02:00
2024-04-30 09:01:45 +02:00
2024-04-30 09:01:45 +02:00
2025-07-15 09:43:24 +02:00
2024-04-30 09:01:45 +02:00
2024-11-27 09:41:12 +01:00
2024-11-27 09:41:12 +01:00
2024-11-27 09:41:12 +01:00
2025-01-18 19:16:33 +01:00
2025-03-03 10:44:05 +01:00
2024-02-13 14:57:55 -08:00
2024-02-13 14:57:55 -08:00
2024-02-13 14:57:55 -08:00
2023-09-29 20:02:38 +02:00
2025-01-06 12:45:31 +01:00
2025-01-06 12:45:31 +01:00
2025-01-06 12:45:31 +01:00
2023-09-15 15:07:39 +02:00
2024-09-26 14:00:13 +02:00
2024-09-26 14:00:13 +02:00
2025-06-30 12:59:51 +02:00
2024-09-26 14:00:13 +02:00
2025-06-17 13:07:44 +02:00
2025-03-28 10:20:26 +01:00
2024-10-03 12:27:25 +02:00
2024-09-26 14:00:13 +02:00
2024-09-26 14:00:13 +02:00
2023-08-17 17:55:48 +09:00
2024-11-29 09:19:33 +01:00
2024-01-30 13:03:55 +01:00
2025-06-30 12:59:51 +02:00
2025-05-20 07:45:14 -07:00
2024-05-06 10:36:19 -07:00
2024-05-06 10:36:19 -07:00
2024-05-06 10:36:19 -07:00
2025-06-26 14:19:30 +02:00
2025-01-06 12:45:31 +01:00
2025-02-26 13:57:33 +01:00
2025-08-02 20:08:53 +00:00
2023-08-28 12:13:42 -04:00
2025-02-26 13:57:33 +01:00
2025-02-26 13:57:33 +01:00
2023-08-28 12:13:42 -04:00
2023-08-28 12:13:42 -04:00
2025-02-26 13:57:33 +01:00
2025-02-26 13:57:33 +01:00
2025-02-26 13:57:33 +01:00
2023-08-28 12:13:42 -04:00
2025-02-26 13:57:33 +01:00
2024-02-20 10:25:01 +01:00
2024-02-20 10:25:01 +01:00
2024-05-14 11:57:10 +02:00
2024-02-13 14:57:55 -08:00
2024-07-23 08:39:11 +02:00
2023-08-28 12:13:42 -04:00
2025-03-19 18:22:00 +01:00
2024-11-27 14:27:31 +01:00
2023-10-16 14:51:05 +02:00
2024-07-24 13:15:08 +02:00
2025-06-30 12:59:51 +02:00
2025-07-03 09:08:00 -05:00
2024-09-19 09:57:25 -05:00
2025-02-26 13:57:33 +01:00