How do you measure fine grain performance on a local computer?
I have some code experiments on my notebook and have a local Linux box I can dedicate to PHP/Phalcon experiments. I want to measure differences between my code and Phalcon for areas where Phalcon does not quite fit and I use my own code.
The measurements would be of different ways to override/replace/reuse Phalcon code.
A large part of the code is database access. I need to separate out that because slight changes to the code might product different accesses. The database is on the same machine. Checking memory usage, paging, and disk related delays would be useful.
My code has to be loaded from disk instead of sitting in memory. I will repeat each test many times to differenciate between code loads and cache fills. I want to make sure that repeated tests are not somehow overloading memory or cache.
Which tools do you use?