lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <x6pr5a18dk.wl%malmeida@netc.pt>
Date:	Sat, 16 Jan 2010 13:34:15 +0000
From:	Marco Almeida <malmeida@...c.pt>
To:	linux-kernel@...r.kernel.org
Subject: Measuring CPU time with getrusage


Hi,

I'm trying to measure the CPU time of several algorithms (some written
in C others in Python) by using getrusage() after wait() for the child
process to end.

On a machine with hypterthreading, the measured user times depend a
lot on the system load of the machine. A heavy system load sometimes
increases the measured time by 10x!

Is there a better way to measure the used CPU time of a given process
(or part of a program) or have I missed some important fact?

Any help appreciated. 

Thanks,
Marco
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ