Blackfire Profiler has a deterministic approach for PHP and Python, meaning it collects an extensive range of metrics for every instrumented request or script.
The quantity of data and metrics collected differ for every layer of data Blackfire collects. The way scripts or requests are chosen to be instrumented also depends on the data layer.
Profiles are manually triggered by a Blackfire user, or automatically triggered by Blackfire builds, the synthetic monitoring feature that evaluates the performance of critical user journeys.
Meanwhile, monitoring traces and extended traces are based on the sample rate, which is the percentage of requests that are monitored.
In that matter, Blackfire Monitoring offers a mix of two approaches:
A blog post provides all the details on the differences and complementarity between Blackfire's monitoring traces, extended traces, and profiles.
Probabilistic profiling involves capturing data intermittently. It collects information at defined intervals, logging functions or services activated by any ongoing request or script. This approach provides a more comprehensive view of your application's performance over time, but certain event nuances may be overlooked due to the frequency of sampling.
Comparing deterministic to probabilistic profiling is akin to contrasting medical imaging devices. Asserting that an fMRI is unequivocally better than a PET scan or ultrasound is a misplaced judgment; each tool has its specific diagnostic purpose.
You might not know all the details about a specific script. But you will have a good overview of everything happening at a specific time. Information on shorter spans starting and ending between two consecutive ticks won't be collected.
Both approaches have their strengths and weaknesses. One is not better than the other. It all depends on the instrumented languages and your understanding of the data.
Deterministic and probabilistic profiling each hold value within the development process. The former delivers a thorough and detailed view, while the latter offers a wider, more adaptable perspective. Developers may choose one or even combine both approaches based on the project's specifics and the issues faced.
Check out this blog post to know more about how continuous profiling integrates with the other data type collected.