Reputation: 2446
Is there an easy way to profile Magento API calls? Did a few searches and the best result I came up with was this one where the guy mentions that there isn't any functionality for this.
I guess it shouldn't be too hard to maybe pop a quick log statement inside Varien/Profiler.php, but I had assumed this might be a little more out-of-the-box-ish.
Upvotes: 2
Views: 1601
Reputation: 12737
No, afaik there's no OOB/built-in way to profile Magento API calls.
Most API methods use standard models in the end, which do have Varien_Profiler
calls embedded, so you still can get some profiling data. See Mage_Core_Block_Profiler::_toHtml()
on how to.
But, there are no Varien_Profiler
calls embedded in the API servers and adapters (SOAP, etc.) afaik, so you wouldn't get any profiling data of these areas (at least not without changing the code).
I'd rather recommend to install a PHP profiler instead of using Varien_Profiler
.
A PHP profiler usually automatically covers all the PHP code being executed. It works for any PHP script and you dont' need to change anything in your PHP scripts to make it work.
Xdebug's Profiler in combination with some analyzing/visualization frontend like webgrind or KCachegrind for example, would give you detailed profiling data, even of Magento API calls.
Upvotes: 1