Does cProfile include IO wait time?

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon Jul 6 01:58:59 EDT 2009


En Sat, 04 Jul 2009 21:03:38 -0300, Matthew Wilson <matt at tplus1.com>  
escribió:

> I expected to see a bunch of my IO file-reading code in there, but I  
> don't.  So
> this makes me think that the profiler uses CPU time, not
> clock-on-the-wall time.
> I'm not an expert on python profiling, and the docs seem sparse.  Can I
> rule out IO as the bottleneck here?  How do I see the IO consequences?

I don't know either - but it's easy to check.
Write a program that just reads a lot from /dev/zero, and look at its  
profile. You should be able to tell whether I/O time is included or not.

-- 
Gabriel Genellina




More information about the Python-list mailing list