Get CPU Usage--- The Updates
The dino image is by Azul Karel from Pixabay (Image 6208027)

Get CPU Usage--- The Updates

So… 

I wrote the initial Get CPU Routine and got some feedback.  (See my prior writing for the link to that video).


Two of the suggestions were: 

A> Remove the SaveArea Logic from the routine because the SaveArea is not used which will improve the performance. 

B> David Staudacher wrote a version that used the Extract CPU Time instruction.   Which the manual states is faster. 

I thought it would be interesting to see how much faster those routines were. 

Speed Testing 3 Get CPU Usage Routines

The video above, is using the Get CPU Usage routines to measure themselves. 


Also, I figured out why the original routine which was named CPUTIME would NOT work when invoked statically. (Hint: I got a suggestion on where to look).  I did the following video to explain what I did wrong:  Why Static Call to CPUTIME Got Invalid Results

To view or add a comment, sign in

More articles by Chris P. Fried

  • Spaces Converted to Zeros in COBOL

    Several times during my z/OS career, I had to explain how SPACES in a zoned-decimal field could be treated as zeros by…

    1 Comment
  • To DYNAM or Not to DYNAM

    It is my opinion that Dynamic calls are easier to work with than static calls. I have a preference for using the CALL…

  • How to Measure CPU Usage

    I wanted a way to measure the impact of coding a piece of code multiple different ways. Just how much slower is adding…

    5 Comments

Explore content categories