Skip to main content

This article explains why the utility cobprof used to generate a PROFILE report might generate a value of 0 milliseconds for some paragraphs that have been executed.

Problem:

Why in the report generated by cobprof do some paragraphs show an execution time of 0 if they have been executed once?

Resolution:

In the provided example, the execution of all paragraphs but the first two have taken a lot less than 1 millisecond, and for that reason the result is 0.

There are two main goals when using PROFILE:


  • To make sure that our tests have executed all the coded paragraphs so we don’t leave part of the code untested. It is for this reason that the results show the accumulated values of all executions (delete the .ipf file to start from 0).
  • To pinpoint those paragraphs that take most of the execution time so we know where all our optimization efforts should go. In the example, more than 83% of the time goes to 00-CONNECT, so that is the paragraph we should check if it can be coded in a more optimum manner if possible.

Taking into account these two goals, anything under 1 millisecond in this situation is not meaningful.

Incident Number: 2285637

Old KB# 14619