WEBVTT

NOTE Created by CaptionSync from Automatic Sync Technologies www.automaticsync.com

00:00:01.086 --> 00:00:07.196 align:middle
We just profiled our first page on production,
which is using the Blackfire Server Id

00:00:07.196 --> 00:00:10.426 align:middle
and Token for the environment we created.

00:00:10.426 --> 00:00:16.756 align:middle
Go to https://blackfire.io, click
"Environments", open our new environment...

00:00:17.306 --> 00:00:19.246 align:middle
and click the "Profiles" tab.

00:00:20.136 --> 00:00:25.416 align:middle
Yep! Whenever anyone creates a profile
using this environment's credentials,

00:00:25.796 --> 00:00:31.746 align:middle
it will now show up here: the
profile belongs to this environment.

00:00:32.976 --> 00:00:37.816 align:middle
We haven't invited any other users to
this environment yet, but if we did,

00:00:38.246 --> 00:00:41.846 align:middle
they would immediately be
able to access this area

00:00:42.346 --> 00:00:46.176 align:middle
and trigger new profiles
with their browser extension.

00:00:46.176 --> 00:00:50.546 align:middle
If you go to back to https://backfire.io
to see your dashboard,

00:00:51.076 --> 00:00:53.336 align:middle
the new profile also shows up here.

00:00:53.666 --> 00:00:56.596 align:middle
But that's purely for convenience.

00:00:57.306 --> 00:01:00.386 align:middle
The profile truly belongs to the environment.

00:01:01.166 --> 00:01:02.446 align:middle
You can even see that right here.

00:01:03.086 --> 00:01:07.476 align:middle
But Blackfire places all profiles
that I create on this page...

00:01:07.696 --> 00:01:08.706 align:middle
to make life nicer.

00:01:09.626 --> 00:01:11.216 align:middle
Click the profile to jump into it.

00:01:12.446 --> 00:01:12.936 align:middle
Of course...

00:01:13.216 --> 00:01:18.026 align:middle
this looks exactly like any profile
we created on our local machine.

00:01:18.576 --> 00:01:20.556 align:middle
But it does have a few differences.

00:01:21.226 --> 00:01:23.116 align:middle
Hover over the profile name to find...

00:01:23.666 --> 00:01:24.906 align:middle
"Cache Information".

00:01:25.866 --> 00:01:32.316 align:middle
We talked about this earlier: it shows stats
about various different caches on your server

00:01:32.566 --> 00:01:35.336 align:middle
and how much space each has available.

00:01:36.246 --> 00:01:41.566 align:middle
Now that we're profiling on
production, this data is super valuable!

00:01:42.426 --> 00:01:48.336 align:middle
For example, if your OPcache filled up, your
site would start to slow down considerably...

00:01:48.746 --> 00:01:51.836 align:middle
but it might not be very
obvious when that happens.

00:01:52.366 --> 00:01:58.086 align:middle
It's not like there are alarms that go
off once PHP runs out of OPcache space.

00:01:58.806 --> 00:02:04.606 align:middle
But thanks to this, you can easily see how
things really look, right now, on production.

00:02:05.666 --> 00:02:11.446 align:middle
If any of these are full or nearly full, you can
read documentation to see which setting you need

00:02:11.446 --> 00:02:13.596 align:middle
to tweak to make that cache bigger.

00:02:14.486 --> 00:02:18.846 align:middle
The other thing I want to show you is
under "Recommendations" on the left.

00:02:19.726 --> 00:02:22.206 align:middle
There are 3 types of recommendations...

00:02:22.376 --> 00:02:27.306 align:middle
and we have one of each: the first
is a security recommendation,

00:02:27.806 --> 00:02:33.836 align:middle
the second is a quality recommendation and
the third a performance recommendation.

00:02:34.756 --> 00:02:40.866 align:middle
Only the performance recommendations come
standard: the other two require an "Add on"...

00:02:41.156 --> 00:02:44.936 align:middle
which I didn't have until I started
using my organization's plan.

00:02:45.866 --> 00:02:50.886 align:middle
As always, to get a lot more info
about a problem and how to fix it,

00:02:51.216 --> 00:02:53.156 align:middle
you can click the question mark icon.

00:02:54.336 --> 00:02:56.976 align:middle
One of my favorite things
about recommendations is

00:02:56.976 --> 00:03:01.846 align:middle
that you can easily convert
any of these into an assertion.

00:03:02.836 --> 00:03:08.106 align:middle
If you click on assertions, you'll remember
that we created one "test" that said

00:03:08.106 --> 00:03:13.546 align:middle
that every page should have -
at maximum - one HTTP request.

00:03:14.106 --> 00:03:21.206 align:middle
We configured that inside of our .blackfire.yaml
file: we added tests, configured this test

00:03:21.206 --> 00:03:27.076 align:middle
to apply to every URL, and leveraged the
metrics system to write an expression.

00:03:28.236 --> 00:03:31.966 align:middle
Back on the recommendations, click
to see more info on one of these...

00:03:32.266 --> 00:03:33.196 align:middle
then scroll down.

00:03:34.356 --> 00:03:40.856 align:middle
Every recommendation contains code that you can
copy into your .blackfire.yaml file to convert

00:03:40.856 --> 00:03:43.466 align:middle
that recommendation into a test...

00:03:43.666 --> 00:03:44.746 align:middle
or "assertion".

00:03:45.896 --> 00:03:48.186 align:middle
That might not seem important right now...

00:03:48.656 --> 00:03:55.366 align:middle
because so far, it looks like doing that would
simply "move" this from a "warning" under

00:03:55.366 --> 00:03:58.816 align:middle
"Recommendations" to a "failure"
under "Assertions"...

00:03:59.126 --> 00:04:00.326 align:middle
which is cool...

00:04:00.476 --> 00:04:02.616 align:middle
but just a visual difference.

00:04:03.246 --> 00:04:05.926 align:middle
But! In a few minutes, we'll discover

00:04:05.926 --> 00:04:09.446 align:middle
that these assertions are much
more important than they seem.

00:04:10.316 --> 00:04:16.706 align:middle
To see why, we need to talk about the key
feature and superpower of environments: builds.

