Backport:

B-g#27060: SQL Profile utility may not be reporting right duration \
      for each step

Whenever the profiler is reset at the beginning of a query, there's
a "hidden" profiling entry that represents that point in time.  It 
has no status description, as those are set by state changes and no
such point has yet been encountered.  That profiling entry is not
in the list of entries generated when we change states.

The profiling code had the problem that each step of printing 
profiling data subtracted the previous "step"'s data, but gave the
label to that data of the current step, which is wrong.  The label/
state refers to the period beginning with that profiling data, not
ending with it.

Now, give a label to the first profiling pseudo-entry, so that we 
have a name to assign to the period that ends with the first state 
change.  Now also use the state name of the previous step in showing 
the delta values that end with this step.
parent 2e698f8c
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment