Profile CodeIgniter 4 requests, filters, and Spark commands with performance monitoring built for teams
Perfbase gives CodeIgniter teams framework-aware traces for request flow, CLI work, and slow database interactions without building custom profiling infrastructure.
Why teams choose Perfbase for CodeIgniter 4
Global filter integration
Spark CLI profiling
Shield and custom user resolver support
CodeIgniter 4
Performance monitoring for CodeIgniter 4 applications
Supported versions
CodeIgniter 4.3.8+
Quick install
composer require perfbase/codeigniter4Starter config
# .env
perfbase.enabled = true
perfbase.apiKey = your-api-keyUse cases
Why teams use Perfbase for CodeIgniter 4
Perfbase is built for teams that need more than a local debug toolbar. It brings production-facing traces, framework-specific context, and shared visibility across the slow paths that matter most in CodeIgniter 4.
Make request bottlenecks obvious
See how routes, filters, and downstream calls combine to slow down CodeIgniter responses.
Keep Spark workflows measurable
Bring migrations, maintenance commands, and other Spark execution into the same profiling workflow.
Add context without custom glue code
Use Shield integration and resolver hooks to attach user context without re-implementing instrumentation basics.
Profiling coverage
What gets profiled and how Perfbase works in CodeIgniter 4
Perfbase stays framework-aware while keeping setup light. These are the behaviors and operational paths this integration is built to expose.
Global HTTP filter
Automatic profiling via a CI4 filter. The install command registers it for you.
Spark CLI profiling
Spark commands are profiled automatically via command lifecycle events.
Shield integration
Authenticated users are automatically attached to traces when Shield is installed.
Doctor command
Run php spark perfbase:doctor to verify your setup.
Custom user resolver
Implement UserResolverInterface for custom user identification.
Include and exclude filters
Filter by route pattern, controller, method, or command name.
Setup preview
How to get started with Perfbase in CodeIgniter 4
Start with install, configuration, and the first framework-specific profiling steps here. When you want full implementation detail, each card links directly into the complete guide.
Installation
Install the Perfbase PHP extension first. This is what does the actual profiling:
Open docs section →
Configuration
Add your API key to .env and enable profiling:
Open docs section →
HTTP profiling
HTTP requests are profiled via a CI4 filter registered as a global before/after filter. The filter:
Open docs section →
Spark CLI profiling
Spark commands are profiled automatically via command lifecycle events. The package decorates CI4's Commands service to fire profiling events before and after each command.
Open docs section →
FAQ
CodeIgniter 4 profiler and performance monitoring FAQ
Can Perfbase profile Spark commands?
Yes. Perfbase supports Spark command profiling so operational and scheduled work is visible alongside web requests.
Does Perfbase work with CodeIgniter Shield?
Yes. When Shield is installed, authenticated user information is attached automatically to traces.
How do I verify my setup?
Perfbase includes a doctor command that helps confirm the extension, package, and configuration are all working together correctly.
Start profiling
Ready to start profiling production traffic?
Create a project, install the package, and start capturing framework-level traces in minutes.