Upcoming Changes: Timeline and Reference Profiles

By Fabien Potencier, on Jul 24, 2015

We are about to release Blackfire 1.0, which includes some major changes in the way we manage your profiles.

Blackfire, the Beta way

The current version of Blackfire works with the concept of “slots“, a storage for profiles. A slot can contain exactly one profile. Beta users have two such slots (a bit more for early adopters), which means that a Blackfire user can store two different profiles at most in their account at any given time; whenever you push a profile into a slot, the previous one is deleted. That also limits the number of possible profile comparisons to just one (comparing the profile in slot 1 with the one in slot 2).

We found that users had a hard time understanding the slot concept and it proves to be too limiting for many use cases. We wanted to give more power to our users and we are very excited to introduce new concepts that will open up many new opportunities for everyone.

Blackfire, the new way

In Blackfire 1.0, slots are gone. All profiles made by a user are now available in an unlimited timeline. One nice side effect is the possibility to compare any two profiles from the timeline:unlimited comparisons. Of course, profiles cannot be kept around indefinitely, so there is a retention policy depending on your plan.

But Blackfire is not just about improving the performance of your code while developing new features or fixing bugs. Blackfire is also a great way to avoid any performance regressions. To achieve that, you need a way to keep profiles that represent the performance of the current version of your application (probably the version in production) for as long as needed. That’s were you need reference profiles. Reference profiles are like regular ones, except that we keep them forever, unlimited retention!

How will it work?

Let’s see some quick examples with the Blackfire CLI tool:

Currently, whenever you take a profile, you need to choose a slot target:

$ blackfire --slot=1 curl http://example.com/

In 1.0, not anymore:

$ blackfire curl http://example.com/

The resulting profile will appear in your timeline and will be automatically deleted according to the retention policy.

Want to keep it around forever? Create a new reference profile:

$ blackfire --new-reference curl http://example.com/

You will notice that in the output, Blackfire gives you the id of the reference profile that you can use to compare it with another profile:

$ blackfire --reference=1 curl http://example.com/

The same goes in the Companion (the Chrome extension), where you can choose “No Reference” to generate a regular profile; “New Reference” to create a new reference, or an existing reference to compare the new profile with the baseline.

Stay tuned for the 1.0 release, it’s coming really soon now!

Happy profiling!

Fabien Potencier

Fabien Potencier is the CEO and founder of Blackfire.io. He founded the Symfony project in 2004 as he constantly looked for better ways to build websites. Fabien is also the creator of several other Open-Source projects, a writer, a blogger, a speaker at international conferences, and the happy father of two wonderful kids.