Profiling Batch Jobs

Previous Next

You can make a BenchMark profile of a batch job in two ways:

1.In the application, run USoft BenchMark and start the Profiler. Then start the batch job, for example by executing the ActionStartJob() method. After the job has finished, stop and save the profile.
2.When executing a job from the Batch Runner, you can add an additional task at the beginning of the job to start the profile using

INVOKE RulesEngine.RuleProfilerStart

 

At the end of the job, you can add a task that stops and saves the profile.

The first solution does not require any change in the job definition. However, sometimes a profile needs to be made in Batch Runner, for example when the job is running on UNIX.

You can do this without changing the job definition of the job to be profiled: Create a new, generic job that only start the profiler, starts another batch job, and stops the profiler. Provide this new batch job with an input parameter named 'job name', and add one SQL task with the following four SQL statements:

INVOKE RulesEngine.RuleProfilerStart

 

INVOKE RulesEngine.RuleProfilerDescription

WITH

SELECT  'Profiling job '|| jobname

FROM    PROFILEBATCH_INPUTPAR

 

INVOKE  BatchRunner.RunJob

WITH

SELECT  jobname        "JobName"

FROM    PROFILEBATCH_INPUTPAR

 

INVOKE RulesEngine.RuleProfilerStop

 

Now, when a job needs to be profiled, this generic job can be started with parameter 'jobname', and then the requested job can be profiled.

For more information, refer to USoft BenchMark help, especially: "How to Make a Profile using the Stand-alone Profiler from Within Another Application".