You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/performance.md
+44Lines changed: 44 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -264,3 +264,47 @@ api_platform:
264
264
```
265
265
266
266
More details are available on the [pagination documentation](pagination.md#partial-pagination).
267
+
268
+
## Profiling with Blackfire.io
269
+
270
+
Blackfire.io allows you to monitor the performance of your applications. For more information, visit the [Blackfire.io website](https://blackfire.io/).
271
+
272
+
To configure Blackfire.io follow these simple steps:
273
+
274
+
1. Add the following to your `docker-compose.yml` file (or an [override file](https://docs.docker.com/compose/reference/overview/#specifying-multiple-compose-files), if only to be used in development)
275
+
276
+
```yaml
277
+
blackfire:
278
+
image: blackfire/blackfire
279
+
environment:
280
+
# Exposes the host BLACKFIRE_SERVER_ID and TOKEN environment variables.
281
+
- BLACKFIRE_SERVER_ID
282
+
- BLACKFIRE_SERVER_TOKEN
283
+
```
284
+
285
+
2. Add your Blackfire.io id and server token to your `.env` file at the root of your project (be sure not to commit this to a public repository)
286
+
287
+
BLACKFIRE_SERVER_ID=xxxxxxxxxx
288
+
BLACKFIRE_SERVER_TOKEN=xxxxxxxxxx
289
+
290
+
or set it in the console before running Docker commands
291
+
292
+
$ export BLACKFIRE_SERVER_ID=xxxxxxxxxx
293
+
$ export BLACKFIRE_SERVER_TOKEN=xxxxxxxxxx
294
+
295
+
3. Install and configure the Blackfire probe in the app container, by adding the following to your `./Dockerfile`
296
+
297
+
```dockerfile
298
+
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
For details on how to perform profiling, see [the Blackfire.io documentation](https://blackfire.io/docs/integrations/docker#using-the-client-for-http-profiling).
0 commit comments