Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

03 - Profiling and Amdahl's Law

Besides understanding hardware utilization, another essential analysis step is to identify the specific parts of your code where the application spends most of its time. Such profiling is crucial to pinpoint performance bottlenecks and not spend the time on less relevant parts.

For example, reducing the runtime of a function responsible for only 10% of total execution time by half would yield only a maximal 5% overall improvement (cf., Amdahl’s Law).

Automatic Profiling on New Commits

To achieve this, Daisytuner always executes a profiling run for each benchmark. This runs your benchmarks again with a sampling profiler enabled, capturing stack traces periodically at a fixed sampling frequency. Each collected snapshot records the state of the function call stack at that moment, enabling a detailed analysis of runtime distribution from the function-call perspective.

Daisytuner uses these snapshots to identify and visualize the most time-consuming parts of your code through a flame graph—an intuitive visualization of the benchmark’s runtime from the function call perspective.

We provide profiling data in two convenient ways:

  • Pull Request Comments: Automatically summarize the top functions contributing most significantly to runtime.
  • Interactive Flame Graphs: Available in our web dashboard, allowing deeper exploration of profiling results.