Software performance patterns improve critical path analysis accuracy
Discovering Performance Archetypes: Critical-Path-Aware Pattern Analysis and Regression Detection
Performance
Summary
Measuring how fast software runs is tricky because just looking at the code isn’t enough. The authors show that many performance issues come from how the program actually runs, including which parts take the most time and use resources. They found 13 common performance patterns shared across different programs. Using these patterns helps spot when software is slowing down, almost 60% better than looking at resource use alone.
What this means in practice
- •For software performance engineers: Detect software slowdowns more reliably by analyzing code paths using combined runtime and resource data patterns.
- •For systems optimization teams: Identify performance bottlenecks across different software domains by matching execution paths to known archetype patterns for targeted tuning.
Authors
Kaveh Shahedi, Heng Li, Maxime Lamothe, Foutse Khomh
Abstract
Software performance analysis and prediction requires integrating multiple signals, as code structure alone cannot capture runtime behavior shaped by execution frequency, resource contention, and I/O patterns. We present a critical-path-aware performance analysis methodology that automatically discovers recurring performance patterns by synthesizing static code features, dynamic execution traces, and kernel-level resource data. In a preliminary study across six real-world C/C++ applications (SQLite, OpenSSL, Zstandard, FFmpeg, cURL, and jq), we first empirically confirm that static complexity metrics explain only 10.4% of the variance ($ρ^2$) in critical path execution time, quantifying a gap that, while theoretically expected, had not been measured systematically across applications. Motivated by this finding, we analyze nearly 80,000 critical execution paths and address two research questions. First, we discover 13 distinct performance archetypes: recurring behavioral patterns that appear consistently across different applications, independent of their domain or implementation. Five of these patterns are near-universal and appear in at least five of the six applications studied. Notably, three of these archetypes are present in all six applications, and together, these common patterns account for 56.4% of all observed paths. Each archetype maps to specific resource profiles and optimization strategies that transfer across domains. Second, we leverage these archetypes within a multi-signal regression detection framework that triangulates path structure, resource consumption, and archetype deviations, achieving an F1-score of 0.867 and a 60.4% improvement over resource-only methods.