Skip to content

Conversation

@Loori-R
Copy link
Contributor

@Loori-R Loori-R commented Oct 31, 2025

Describe Your Changes

This PR improves overall performance and stability of chart rendering, refines time series generation, and fixes incorrect median calculation in metric series.
JavaScript execution time improved by up to ×6 on large datasets.

Changes:

  • Reworked getTimeSeries - one point per pixel.
  • Added legend auto-collapse when >20 items.
  • Switched median algorithm to Quickselect (Floyd–Rivest).
  • Unified array stats functions (min, max, avg, median) into a single pass.
  • Removed unused last value from series.
  • Renamed roundToMilliseconds to roundToThousandths and moved to utils/math.
  • Replaced isSupportedDuration with parseSupportedDuration, added fractional duration support.

Related issues: #9699, #9926

Checklist

The following checks are mandatory:

- improve overall chart rendering and data processing performance (#9699)
- fix incorrect median value calculation in series (#9926)

Signed-off-by: Yury Molodov <yurymolodov@gmail.com>
@Loori-R Loori-R added the vmui UI for ad-hoc queries in VictoriaMetrics or VictoriaLogs label Oct 31, 2025
@makasim makasim self-assigned this Nov 4, 2025
Copy link
Contributor

@arturminchukov arturminchukov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vmui UI for ad-hoc queries in VictoriaMetrics or VictoriaLogs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

app/vmui: incorrect median calculation for series VMUI stability issues in Safari

3 participants