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 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 Chief Product Officer at Blackfire. He's an engineer, but probably one of the least "tech" people in the company. He's wearing many hats, from product management to marketing and sales. He loves the beauty of simple solutions that solve actual problems.