Q:

What is a profiler measuring and how is that different from TTFB?

I am using the magento profiler and it gives a reading of how long it took for the PHP code to run, I think.
What I have found that the TTFB - time to first byte value is much higher (sometimes double) than the profiler time.
What else is forming part of the TTFB value?
Here is the profiler time below:

Here is the TTFB for the same request:

A:

The profiler is not including the magento/lib code execution.
You should use a PHP debugger instead of the magento one.

