xprof icon indicating copy to clipboard operation
xprof copied to clipboard

Line graph with configurable lines

Open gomoripeti opened this issue 6 years ago • 2 comments

Currently columns (lines or keys) are hardcoded in GraphConstants.js.

It would be nice to have the flexibility to have more or less lines or have custom labels. Some examples:

  • when return-value matching is enabled there would be an additional total_count (counting all the function calls) and count would show the number of matched return values. Useful to see the ratio of matching.
  • command funcount would only gather call count (and maybe average latency) but not percentiles. This is an optimisation in the backend using different kind of tracing with less overhead. So it would only have count and mean keys.

So columns and labels should be created based on the keys in the data sent by the backend. It is guaranteed that one monitor (belonging to one query) would always send the same keys in its samples.

Open question how to set colours and which columns to hide by default.

gomoripeti avatar Oct 09 '18 10:10 gomoripeti

Additionally it would be nice to allow derived lines, two examples:

  • retmatch: switch between showing nominal values for both count and total_count or only show a percentage rate of count / total_count
  • funcount: switch between showing both count and mean or only total time spent count * mean

I don't have an idea how to implement this (so this can be a separate task)

gomoripeti avatar Oct 11 '18 07:10 gomoripeti

#154 gives a generic and lightweight FE solution where only the lines sent by the BE as keys are displayed on the line-graphs. There is no hard-coded list any more, but it is possible to define colors, y-axes etc for certain names (if they are present). There is no derived lines or switching, instead the BE sends all of count, total_count and match_rate if applicable, but the two later will be hidden by default.

gomoripeti avatar Nov 05 '18 23:11 gomoripeti