Viewing Key Performance Metrics over Time

By Christophe Dujarric, on Sep 11, 2017

We’re very happy to announce the first feature which will allow you to see the evolution of your code’s performance over time. Meet the Builds Statistics.

What is that exactly?

Build statistics are compiled across all profiles generated in the builds, within a Blackfire environment. They include PHP cache hit rate (OPCache, APCu), cache usage (OPCache, OPCache Interned Buffer String, Realpath cache, PCRE cache, APCu), and “envelope costs” per URL which has been profiled in the builds (Wall-time, I/O, CPU, Memory and Network).

Example take-away: OPCache configuration

Cache hit rate and cache usage, together, can tell you if you properly configured OPCache. As much as possible, you want to hit OPCache. That means that your PHP scripts have already been parsed and that PHP won’t need to do that job again. So your hit rate should be around 100%. Around 80%, you probably have a too small cache size.

That’s why monitoring cache usage is also important. The point is to have just the right cache size. In the case of OPCache, you should be nearing 100%, but never reach it. Reaching it would most likely mean that it’s too small, but you’d then also have a corresponding hit rate inferior to 100% to confirm.

On the graph above, the Blackfire.io website has a steady OPCache hit rate of 100%, and OPCache usage of around 96%.

Example take-away: overall performance stability

The “URLs envelopes” statistics show you for the most common URLs you’ve been testing in builds, how much main() is costing in terms of Wall-time, I/O time, CPU time, Memory and Network (read more about time flavors in Blackfire).

The usage of the graph is pretty straight forward: it will help you spot unexpected performance evolutions, as well as trends up or down. Of course, you should always verify further what’s going on by viewing profiles.

Maybe our performance recommendations can help!

Tip of the day: PCRE cache

Did you know PHP has a cache for regular expressions? That’s what we show as PCRE cache on the Cache Usage graph! Check it out!

Note: This feature is part of the Blackfire Enterprise and Blackfire Enterprise for Magento Cloud editions.

Happy performance optimizing!

Christophe Dujarric

Christophe is the Product guy at Blackfire/SensioLabs. He has been working in several start-up companies, helping them to make and sell products out of technologies. He’s involved in every step of the product’s lifecycle, from strategy to design and sales, and loves to coach on product management methods.