how to measure running time in nanosecond?

how to measure running time in nanosecond?

Post by ·¨¨?a » Sat, 14 Aug 1999 04:00:00



using do_gettimeofday & timeval just can measure in microseconds

does there any patchs or methods help me to do this

thanks in advance


 
 
 

how to measure running time in nanosecond?

Post by Juergen Hein » Sat, 14 Aug 1999 04:00:00



>using do_gettimeofday & timeval just can measure in microseconds

>does there any patchs or methods help me to do this

Just a note, to get nanoseconds you'll need a very accurate
clock and you'll hardly find such a beast in any kind of PC
hardware. In other words, numbers are a nice thing but one
ought to interpret them too.

Ta'
Juergen

--
\ Real name     : Jrgen Heinzl                 \       no flames      /


 
 
 

how to measure running time in nanosecond?

Post by M van Oosterhou » Tue, 17 Aug 1999 04:00:00



> using do_gettimeofday & timeval just can measure in microseconds

> does there any patchs or methods help me to do this

Pentium has an rdtsc instruction that can do this.

Martijn

 
 
 

how to measure running time in nanosecond?

Post by David Schwart » Sun, 22 Aug 1999 04:00:00


        Use Linux-2.2.11 and then add Ulrich Windl's 'NANO' patches. You can
find them in PPSkit-0.7.1 available from the various ftp.kernel.org
mirrors in pub/linux/daemons/ntp/pps

        You can then use 'ntp_gettime' to get a timespec, which has the time in
nanoseconds. Look in /usr/include/linux/timex.h

        It won't do much unless you:

        1) Have a Pentium or better processor.

        2) Disable any powersaving features such as APM.

        DS


> using do_gettimeofday & timeval just can measure in microseconds

> does there any patchs or methods help me to do this

> thanks in advance



 
 
 

how to measure running time in nanosecond?

Post by Mark Hah » Mon, 23 Aug 1999 04:00:00


Quote:>    Use Linux-2.2.11 and then add Ulrich Windl's 'NANO' patches. You can

there's no reason to use any particular kernel or patches.  the following
provides ultimate resolution; calibrating it (finding secondsPerTick)
is pretty trivial:

typedef unsigned long long u64;

inline u64
rdtsc() {
    u64 clock;
    __asm__ __volatile__("rdtsc" : "=A" (clock));
    return clock;

Quote:}

 
 
 

how to measure running time in nanosecond?

Post by Hee-Chul Yu » Tue, 24 Aug 1999 04:00:00



>>        Use Linux-2.2.11 and then add Ulrich Windl's 'NANO' patches. You can
> there's no reason to use any particular kernel or patches.  the following
> provides ultimate resolution; calibrating it (finding secondsPerTick)
> is pretty trivial:
> typedef unsigned long long u64;
> inline u64
> rdtsc() {
>     u64 clock;
>     __asm__ __volatile__("rdtsc" : "=A" (clock));
>     return clock;
> }

more simple way is to use 'get_cycles()' function.
which is defined in <asm/timex.h> and that function use 'rdtsc' as you
know..

--


        KAIST CS Dept, CA Lab.        Phone : 5552(Lab), 017-755-9413

 
 
 

how to measure running time in nanosecond?

Post by David Schwart » Fri, 27 Aug 1999 04:00:00


        There's a lot of problems with this including at least:

        1) It will break horribly on SMP systems.

        2) It will break horribly on CPUs that don't have a cycle counter.

        3) It will provide, at best, 100ppm accuracy.

        DS



> >>      Use Linux-2.2.11 and then add Ulrich Windl's 'NANO' patches. You can

> > there's no reason to use any particular kernel or patches.  the following
> > provides ultimate resolution; calibrating it (finding secondsPerTick)
> > is pretty trivial:

> > typedef unsigned long long u64;

> > inline u64
> > rdtsc() {
> >     u64 clock;
> >     __asm__ __volatile__("rdtsc" : "=A" (clock));
> >     return clock;
> > }

> more simple way is to use 'get_cycles()' function.
> which is defined in <asm/timex.h> and that function use 'rdtsc' as you
> know..

> --


>         KAIST CS Dept, CA Lab.        Phone : 5552(Lab), 017-755-9413

 
 
 

1. How to measure the program run time?

Hi, all

I am doing my Software Engineering's project. This project
is both written in C++ and C. Professor required us to provide
a comparison of the performance. How can I measure the time
a program runs? I tried to use the time command, but I can
not understand what is meaning of real time, system time, and
user time. I also tried to use gprof, but it generated a long
report. I do not know how to use the gprof's report.

Would you like to give any advice?

Thanks a lot.

2. Networking within linux and Win98

3. Measure the time a program needs to run

4. Diamond Viper 550

5. Measure run time

6. Holy Troll-Poop Batman!

7. time in nanoseconds?

8. Device Drivers for Solaris 5.4?

9. Support for micro/nanosecond [acm]time in the NFS client

10. How can I measure CPU-time and Network traffic time ?

11. Pull out your tools, it is time to measure!

12. Measuring time bet. instructions on IRIS

13. measuring time intervals precisely