HP3000-L Archives

February 1996, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jerry Fochtman <[log in to unmask]>
Reply To:
Jerry Fochtman <[log in to unmask]>
Date:
Tue, 27 Feb 1996 13:03:27 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (33 lines)
At 05:12 PM 2/27/96 +0100, peter van boheemen wrote:
>Is there anybody out there who can help me solve the following
>problem.
>I want to log the cpu-time spend searching a data base.
>I looked at the PROCTIME intrinsic, but this will only tell me
>how much CPU time is spend in the current process. In this case
>the user-interface is launching sub processes to do the searches.
>Then I tried to get hold of the HPCPUSECS variable, before and
>after the search and log the difference. I got strange results, so
>I checked the manuals and noticed that HPCPUSECS, if retrieved from
>the CI process, will return the number of cpusecs consumed during
>the entire session, but if retrieved from any other process it will
>return the cpusecs spend in that current process. (silly, isn't it)
>Now I am lost.
 
To obtain process time of a sub-process would require the use of PM, and the
AIF procedure.  The parent process would also have to know when it is
appropriate to obtain the process time for a sub-process (which obviously
increases the complexity of the task...)
 
A much simplier approach would be to have each sub-process do a PROCTIME
before and again after the search, compute the difference and report it or
pass it back to the father (msg file possible).
 
When I've incorporated timing or debugging steps in code I've used a
compliler switch to enable/disable inclusion of the code as a part of a
conditional compilation.  You might consider this if you don't need this
data all the time.  When you're in full production you may not want to incur
the constant overhead associated with this data....
 
 
-- Jerry

ATOM RSS1 RSS2