Profiling Laravel applications using the open-source Monica CRM as example

Tideways has powerful built-in instrumentation for Laravel, including Eloquent Models and Blade Templating language. To show this support we have added a demo application using the excellent open-source Laravel application Monica – a CRM for your friends and family. You can sign up for Tideways for free and take a look at this and other demo applications.

The Laravel demo is running on Heroku and using the Heroku composer package for Tideways. Pre-populated with some demo data, we run a complex Siege scenario to generate traffic on various read and write actions every minute.

Tideways framework detection automatically monitors performance, memory usage and requests from individual Laravel controllers and actions, with no code changes necessary:

Transaction performance of Laravel Application Monica CRMTransaction performance of Laravel Application Monica CRM

When you drill down to transaction traces, you can see the performance timeline of individual requests filled with detailed information about Laravel Events, Eloquent Queries and Blade Template renders.

In this trace for the People::edit controller, we can see that bootstrapping and loading the user object from the session takes the first third of the request, the controller itself takes roughly a third and then the view takes the last third:

Profiling Laravel Elqouent and Blade TemplatesProfiling Laravel Elqouent and Blade Templates

Clicking on the Eloquent User model timespan, you can see details which kind of operation was performed on the model:

Profiling Laravel Elqouent QueriesProfiling Laravel Elqouent Queries

And for the template you can see its filename:

Profiling Laravel Blade TemplatesProfiling Laravel Blade Templates

Tideways provides other Laravel specific instrumentation such as Session garbage collection, service provider bootstrapping time and the duration of all Laravel events. As a result you are always fully informed about the performance of your Laravel application and which performance problems to fix for the biggest improvement.

Try Tideways on your own Laravel applications and sign up for our 30 days free trial.

Benjamin Benjamin 14.06.2017