Files
impala/www/scripts
Surya Hebbar e0a0bb3617 IMPALA-13233: Improve display of instance-level skew in query timeline
Representing phases of multiple instances in a single bar with dividers
makes it challenging to distinguish between the perimeters of each
instance's phases, hindering other instances that have already started
with the subsequent phase. Hence, the correlation between the recorded
profile metrics and the user's desired representation is less.

To improve this representation, the phases of each fragment's instances
are now being aggregated and displayed as a histogram on the timeline,
making it easier to understand the distribution of start time and
end time of different instance's phases.

When there are more than 5 instances for a phase, respective timestamps
are bucketed into 5 divisions, each spanning 20% of the difference
between maximum and minimum timestamp value. Each division's timestamps
are aggregated and then maximum value is plotted on the query timeline.

The height of each division's phase rectangle is proportional to
the number of instances in that division. A division without
any instances is not represented.

If the number of instances are less than or equal to 5, for each event,
instance timestamps are sorted in ascending order before plotting.

This results in a descending staircase form of aggregated metrics
display, where maximum timestamps within each of the 20% spanning
divisions is shown.

The precision of SVG elements' position and dimensions have been limited
and are set by the user. They will have the same precision as that of
the timeticks.

The order of rendering phases and iterating through colors for each
plan node has been reversed, in order to support this representation.

A tooltip containing the following additional details is displayed,
when hovering on a plane node's bucketed phase rectangle.
- With respect to the hovered on bucketed phase rectangle
  - No. of instances
  - Event's Maximum Timestamp (in seconds)
  - Event's Minimum Timestamp (in seconds)
  - Event's Average Timestamp (in seconds)

Outlines are drawn at the top and bottom of each plan node, according to
the timestamp of the instances' final closing phase.

The attribute 'stroke-dasharray' has been used to add separators between
the perimeters of each instance's phases, instead of an additional
SVG line element each time.

Redundant calls to 'appendChild' methods and setting fragment's ID
after each iteration have been removed.

With this approach, the number of SVG elements in the fragment diagram
is reduced substantially, resulting in very fast rendering times.

Similar to "HASH_JOIN_NODE", the rendering of 2nd and 3rd events
("Waiting for initial build" and "Initial build available")
for the node type "NESTED_LOOP_JOIN_NODE" have also been skipped.

Replaced equality operators with strict equality operators.

Manually tested with various profiles, sizes ranging from 4MB to 430MB.

Change-Id: Ied8a5966e9e4111bf7aa25aee11d23881daad7d2
Reviewed-on: http://gerrit.cloudera.org:8080/21593
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2024-09-18 20:00:44 +00:00
..