Tutorial: Selling Blackfire to your boss with the help of Google
“We don’t need Blackfire, we don’t have performance problems”. A few tips for developers to let their bosses know they might be wrong.
You cannot optimize what you cannot measure.
This sound obvious to developers.
Blackfire is the only tool that enables PHP developers to measure their code’s performance in development, test, staging and production. It enables them to understand exactly how their code behaves, and find optimization options. They can then validate their ideas by measuring again.
But this is often Black Magic to business/marketing stake holders.
Google can tell you that you need Blackfire
Once in a while, at conferences, I get to meet people telling me: “I don’t need Blackfire, I don’t have performance problems”. Well it’s not because you’re not getting (hearing?) complaints from your users that you don’t have performance problems. And you don’t know as long as you didn’t measure.
Blackfire’s installation procedure takes about 5 minutes. Within 15 minutes, most developers find an optimization in their code. Twitter can tell.
Now what if you’re not a developer? What if you’re a developer, but still need to convince a non-tech boss, that the time you’ll spend using Blackfire can save a lot of money?
Google has some powerful tools to support. Any wise marketing/business guy probably checks Google Analytics once in a while. This massively used traffic analytics software has amazing capacities to understand how you acquire and retain visitors and users, and it constantly gets more features.
Google Analytics Site Speed Metrics
The whole Site Speed section is worthwhile, giving high level site speed metrics. Starting with the overview:
Those are the stats of https://blackfire.io.
DoubleClick, a Google company, showed that 53% of mobile site visits are abandoned if pages take longer than 3 seconds to load.
Looking at our average page load time, we’re not in a bad position. The same DoubleClick study says that 1 out of 2 people expect a page to load in less than 2 seconds. OK, we’re quite close, and there’s still probably some room for improvement!
How about you?
Google Analytics Site Speed Suggestions
Most developers know https://developers.google.com/speed/pagespeed/insights/
Well, it has been embedded in Google Analytics, under Behaviour > Site Speed > Speed Suggestions.
It seems Google has some suggestions for us, let’s have a look at it!
Right, we’re doing pretty good with Desktop, but could improve with Mobile.
The main take away will be:
PSI estimates this page requires 6 render-blocking round trips and ~38 resources (0.8MB) to load. The median page requires 4 render-blocking round trips and ~75 resources (1MB) to load. Fewer round trips and bytes results in faster pages.
You know where we’re especially good? Server Response Time! Yes, that one, which Blackfire will help you on. That means we match Google’s recommendations to have a server response time below 200ms.
Staying below the 200ms
Now the reality is that making this happen is a constant fight.
Any code change can introduce a regression in performance. How do you make sure this won’t happen? Beyond one-off profiling, Blackfire’s tests and automations make it possible to validate code changes, with the smallest footprint possible. Oh, and to make it easier, Blackfire will detect poor patterns in the code or PHP configuration and recommend optimizations.
Have a full Continuous Integration/Continuous Deployment pipeline? Blackfire fits right in!
Not there yet? We know how hard it can be to set this up. That’s why we build the Periodic Builds feature. The only thing you need is a server (staging or production) that Blackfire can reach. By the way, try combining that with our Security and Quality add-ons).
And most important: According to Boehm and Basili’s “Software Defect Reduction Top List” published in 2001, the cost of fixing a bug is 14 times more expensive after release (from $937 in development to $14,102 in production).
Blackfire is built to detect performance bottlenecks even before your code reaches production!
It’s all about the money
Still not clear to the business guys how much money they’re loosing?
Combine those numbers you found in Google Analytics with Google’s Scorecard and Impact Calculator.
Let’s make a simulation, comparing some of the major online retailers:
So Walmart.com could use some performance boost. In order to fill the impact calculator, we’ll use the Forbes’ metrics on Walmart’s conversion rate, and eMarketer’s metrics on the number of monthly unique visitors. Let’s assume a $100 average order value.
What’s 1.2 seconds in a lifetime, right?