How to profile a Yii2 based API?

I have an API application written in Yii2 framework and I don’t know how to measure and track the performance as I am keen to see what is happening behind the curtain. My API is using MongoDB and I also would like to see the queries somehow I just don’t know where to start. The Yii2 has its own integrated debugPanel which is great, but works only with browsers and can’t have the benefits with using Postman to perform API calls for instance.

How do you guys do it on the dev and live environment?



I am using NewRelic to keep an eye on the application (RESTful) which operates on multiple servers.

Here’s a screenshot from the performance of Contentized.


Screen Shot 2015-10-08 at 12.49.40.png

Wow, it looks neat! Let’s have a look…