xprof
xprof copied to clipboard
Line graph with configurable lines
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) andcount
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 havecount
andmean
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.
Additionally it would be nice to allow derived lines, two examples:
-
retmatch
: switch between showing nominal values for bothcount
andtotal_count
or only show a percentage rate ofcount / total_count
-
funcount
: switch between showing bothcount
andmean
or only total time spentcount * mean
I don't have an idea how to implement this (so this can be a separate task)
#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.