Capturing rows Per second

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
saikir
Participant
Posts: 92
Joined: Wed Nov 08, 2006 12:25 am
Location: Minneapolis
Contact:

Capturing rows Per second

Post by saikir »

Hi All,

Using DSGetLinkInfo we can capture the Link Count. Is there any way to capture the rows per second of that particular link that appear in the Job Canvas?

Regards,
Sai
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

AFAIK, you'll need to compute that yourself from the elapsed time of the job run and your count.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There is a way, but you're going to slow down execution considerably if you try to capture this information while the job is running.

CPU consumption is captured periodically and recorded in various records in the repository table RT_STATUSnnn for job number nnn. So, however you do it, you're going to need to determine which resource records you need to read, and then to read them. And remember that RT_STATUSnnn is a hashed file, so you have to use an appropriate API to do that.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
saikir
Participant
Posts: 92
Joined: Wed Nov 08, 2006 12:25 am
Location: Minneapolis
Contact:

Post by saikir »

Hi All,

Thanks a lot for your suggestions. Was able to capture the rows per second by dividing the link count with the elapsed time for that stage.

Regards,
Sai
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How (and when) did you get the elapsed time for the stage?

Be aware that you will only get times reported as at the sampling intervals; elapsed time is not a continuous measure. Statistical error may be quite large for short intervals.

If you regard this as resolved, please mark it so using the green button at the top of the page.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
saikir
Participant
Posts: 92
Joined: Wed Nov 08, 2006 12:25 am
Location: Minneapolis
Contact:

Post by saikir »

Hi Ray,

I was calling the following code after the job completes and so far it has yielded me the expected results i.e. the rows per second in the job canvas are matching the routine output barring decimal values.

$INCLUDE DSINCLUDE JOBCONTROL.H

hJob1=DSAttachJob(Arg1,DSJ.ERRWARN);
Ans=DSGetStageInfo(hJob1,Arg2,DSJ.STAGEELAPSED);
Ans=DSGetLinkInfo(hJob1,Arg2,Arg3,DSJ.LINKROWCOUNT)/Ans;
Reply=Ans

Regards,
Sai
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

After the job is best; I wanted to establish you weren't trying to gather these statistics within the job itself. But beware that the timing still has statistical error for short durations. For a start it's only reported in whole seconds, so (for example) 1.0 means somewhere between 0.5 and 1.5 second.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply