How to know running time of a specific function?

I am using PHP and Zend. Some of my code is taking too much time to execute. What is the best method to know that how much time is consumed by a specific function/constructors.

For example:

I am calling a function like this:

$insuranceModel = new Model_Insurance_Object();
$insurances = $insuranceModel->getInsurancesList();

getInsurancesList function in Model_Insurance_Object class

public function getInsurancesList() {
  // function body

What should I implement and where should I place ??



XDebug has a Profiler. It seems, that is exactly, what you are looking for.

Need Your Help

Why boost-multi-index gives back a wrong iterator?

c++ boost boost-multi-index

Boost documents said that iterator_to gives back a valid iterator but the code below shows that something other happens.

Why does it take longer for my program to read files on windows than on Ubuntu

c++ visual-c++ ubuntu

I am basically reading 100000 strings from a .txt file and making an AVL tree using the information. The .txt file is 30+ mb.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.