Help using Base SAS procedures

Capture cpu time and elapsed time

Reply
N/A
Posts: 1

Capture cpu time and elapsed time

I need to calculate the ratio between the cpu time and the elapsed time for different job

I search a lot but I don't found how I can store this variable in a database

I want a database like that

User
Job
Production date
Production hour
cpu time
elapsed time

Thank you for your answer
N/A
Posts: 0

Re: Capture cpu time and elapsed time

see the documentation on ARM
(application response measurement)
Occasional Contributor
Posts: 5

Re: Capture cpu time and elapsed time

I think my brute force approach would be to modify the programs use %let macro variables to capture the userID and production date and time. jobName would have to be hardcoded. Use proc printto to redirect the log to an external file. When the job finishes turn off proc printto and have it run a data step (but I'd put it in a macro) that reads in the external log file with each line as a single long character variable. Be sure to use the end= data set option so you know when you've reached the last record. Either substring or index each line looking for the phrases 'real time' and 'cpu time' and parse them when found to get the values. Sum those values and carry the values forward using a Retain statement. When you've reached the last line in the log file then calculate the ratio and write the macro variable values, the totals, and the ratio as a record to your database.
Ask a Question
Discussion stats
  • 2 replies
  • 269 views
  • 0 likes
  • 3 in conversation