Time::HiRes module and timing a command...

A

Adam

Hi All,

Another request for your wisdom, if that's OK...

I want to write a small perl program to test the performance of
ClearCase. Searching for ways to do this lead me to the Time::HiRes
module. This isn't present on our system (Solaris), so I downloaded
the tarred, gzipped module from cpan. Unzipped and untarred it, then
tried to build it.

Executing 'perl Makefile.PL' worked perfectly, but then 'make'
returned a whole lot of warnings. These were mostly of the form:
"./ppport.h", line 3298: warning: invalid white space character in
directive
"./ppport.h", line 3404: token not allowed in directive: \
"./ppport.h", line 3405: syntax error before or at: ||
"./ppport.h", line 3420: identifier redefined: defined
current : function() returning int
previous: function(int) returning int : "./ppport.h", line
3405
"./ppport.h", line 3420: parameter not in identifier list: my_cxt_sv
"./ppport.h", line 3420: cannot initialize parameter: my_cxt_sv
"./ppport.h", line 3420: undefined symbol: MY_CXT_KEY
"./ppport.h", line 3420: invalid source character: '\'
"./ppport.h", line 3421: warning: improper pointer/integer
combination: arg #2
(There were 541 lines of warnings/errors, so I've just produced a
flavour)

although there was also a:
"/usr/perl5/5.00503/sun4-solaris/CORE/perl.h", line 1384: warning:
operand treated as unsigned: 0x87654321

Then the make failed... If anyone can give me any insights I'd be
grateful.

Now the important bit: s there a way of timing the execution of a
shell command without using Time::HiRes?

Cheers - Adam...
 
M

Michele Dondi

ClearCase. Searching for ways to do this lead me to the Time::HiRes
module. This isn't present on our system (Solaris), so I downloaded

OTOH Time::HiRes is in the core modules as of recent enough perls. So
installing one may well be an overkill for this particular task only,
but you still may want to do it anyway...


Michele
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top