Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: benchmark: user vs system

by bigmacbear (Monk)
on Aug 30, 2006 at 01:24 UTC ( [id://570287]=note: print w/replies, xml ) Need Help??


in reply to benchmark: user vs system

On almost any system, performance is monitored by counting not only the elapsed time ("wallclock seconds") but also "CPU seconds", or in other words the amount of time your process spends actually running on the CPU as opposed to sleeping or waiting for some other process (such as I/O) to complete. On Unix and Unix-like systems, CPU time is further subdivided into at least two classes, "user" and "system" time.

User time is time used by the CPU while running in your process's user space. This includes your code, as well as code such as the Perl interpreter itself or provided by a library/module.

System time is time used by the CPU while running in the operating system space on behalf of your process.

If you're on a Unix system, look at the man pages for time(1) and times(2) which are how Benchmark is probably implemented "under the hood". If you're on Windows, more than likely Perl is using either the Windows equivalent of the common Unix system calls above (any Windows based on the NT code base will have a POSIX subsystem that implements these system calls) or an emulation of them compiled into the Perl interpreter itself.

Replies are listed 'Best First'.
Re^2: benchmark: user vs system
by schulerlab (Initiate) on Sep 01, 2006 at 04:39 UTC
    Thank you so much for all the replies. I understand the difference between the two terms much better now. Thanks again.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://570287]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-04-25 10:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found