blackfire
Profile PHP application performance
TLDR
Profile a PHP script
SYNOPSIS
blackfire [options] subcommand [arguments]
DESCRIPTION
blackfire is the CLI tool for the Blackfire profiler, a performance management solution for PHP applications. It profiles PHP scripts, HTTP requests, and web applications to identify performance bottlenecks.
The tool integrates with Blackfire.io cloud services to provide detailed flame graphs, call graphs, and performance recommendations. Profiles can be compared to track performance changes over time.
PARAMETERS
--env uuid
Target environment UUID for the profile--json
Output profile results in JSON format-q, --quiet
Suppress output (do not display profile URL)--samples n
Number of samples to collect--title text
Set a title for the profile--external-id id
Set an external identifier for the profile--ignore-exit-status
Ignore non-zero exit status from profiled command
CONFIGURATION
/etc/blackfire/agent
Blackfire agent configuration including server credentials and socket settings.~/.blackfire.ini
Client-side configuration with client ID and token for authentication.
SUBCOMMANDS
run
Profile a PHP CLI script or commandcurl
Profile an HTTP request (uses system curl)upload
Upload a profile to Blackfire.ioclient:config
Configure client credentialsagent:config
Configure agent settings
CAVEATS
Requires a Blackfire account and properly configured credentials (BLACKFIRECLIENTID and BLACKFIRECLIENTTOKEN). The Blackfire PHP extension must be installed for profiling to work. The curl subcommand requires curl to be installed on the system.
HISTORY
Blackfire was created by SensioLabs (the company behind Symfony) and launched in 2014 as a commercial profiling solution. It evolved from the open-source xhprof profiler and provides continuous performance monitoring for PHP applications.
