lightweight function for measuring time ( better than clock_getime )
HI
I have a Red Hat Enterprise with Real Time kernel.
Are you aware if there are C functions for this kernel or some code/library for this OS for measuring time more lightweight than clock_gettime and gettimeofday? THe hardware I have is NUMA.
Reading forums I found gethrtime but it is available on Solaris only; this last spends few cycles compared to clock_gettime and gettimeofday eating the CPU.
Do you know if for Red Hat someomene did something similar?
My distro is the following
Hi
after few research I didn't find a better function than clock_getime or a specific function for RedHat distro BUT I can tell you that in the 2.6 kernel there are new ID available for clock_getime.
If you use version 2.6.28 you can use a new clock type, CLOCK_MONOTONIC_RAW
If you use version 2.6.32 you can use a new clock type, CLOCK_REALTIME_COARSE and CLOCK_MONOTIC_COARSE.
Someone did some tests with it and they seem 5 times faster than the code used by CLOCK_MONOTONIC and CLOCK_REALTIME.
I wrote this kernel module to test the correctness of ndelay() function.
Kernel mdoule:
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/time.h>
#include <linux/delay.h>
static int __init initialize(void)
{
ktime_t start, end;
s64... (1 Reply)
hello everybody!
i want to post a question. So, I use the command 'time a.out' to time the duration of the program a.out. The return value of this function was:
real 0m4.116s
user 0m4.112s
sys 0m0.016s
What i want is! I try to find a way to get (NOT manually) the value of real time.... (2 Replies)
Hi All,
I am using solaris and nawk.
Is there any time function in nawk which is simliar to the shell `date` function ?
Can any experts show any examples? (4 Replies)
Hello
I have problem with function 'time' to test my program for file copying .
How to run the function in my source code ?
I try something like that:
system("time"); < -- but this don't working (2 Replies)
Hi,
I would like to display the exact time taken to complete running a particular tool or function or program to user
I don't know the exact time functions in unix, please help me
thanks in advance
Example:
$test.ksh
output should be
The... (10 Replies)
Can anyone please help me in measuring the system call timings!
How do I do it if I have to measure the timing of an operation, say getpid system call.
What different functions can I use for that and what would be the difference using each of them?
Thanx! (3 Replies)