Install coz-profiler by entering the following commands in the terminal:
sudo apt update sudo apt install coz-profiler
Finding Code that Counts with Causal Profiling
Coz is a code profiler that find optimization opportunities missed by traditional profilers. Coz employs a technique called causal profiling that measures optimization potential. This measurement matches developers' assumptions about profilers: that optimizing highly-ranked code will have the greatest impact on performance. Causal profiling measures optimization potential for serial, parallel, and asynchronous programs without instrumentation of special handling for library calls and concurrency primitives. Instead, a causal profiler uses performance experiments to predict the effect of optimizations. This allows the profiler to establish causality: "optimizing function X will have effect Y," exactly the measurement developers had assumed they were getting all along.