I’m having trouble understanding the documentation of os.times(). From http://docs.python.org/library/os.html:
Return a 5-tuple of floating point numbers indicating accumulated (processor or other) times, in seconds. The items are: user time, system time, children’s user time, children’s system time, and elapsed real time since a fixed point in the past, in that order. See the Unix manual page times(2) or the corresponding Windows Platform API documentation. On Windows, only the first two items are filled, the others are zero.
Finding any other resource on the command seems a bit challenging.
Assuming each CGI call spawns a new python process: what do the first two values of the following result from a os.times() actually tell me? What am I actually measuring if I make use of them?
(0.2184014, 0.17160109999999998, 0.0, 0.0, 0.0)
They tell you how much processor time (as opposed to time waiting for I/O operations) has been spent in program code (i.e. the python interpreter) and OS kernel code (i.e. processing system calls made by the python interpreter), respectively, by this process so far.
There’s some more detail in the times(2) man page referred to by the docs, as well as the time(7) man page.