Skip to content

[Studio] fix: order metrics samples by timestamp - #2157

Closed
yuluo-yx wants to merge 1 commit into
apache:rocketmq-studiofrom
yuluo-yx:0813-yuluo-yx/fix-17
Closed

[Studio] fix: order metrics samples by timestamp#2157
yuluo-yx wants to merge 1 commit into
apache:rocketmq-studiofrom
yuluo-yx:0813-yuluo-yx/fix-17

Conversation

@yuluo-yx

Copy link
Copy Markdown
Member

Summary

  • stably sort finite metric samples by timestamp
  • draw chart points from oldest to newest
  • derive the displayed latest value from the chronologically latest sample

Fixes #2152

Validation

  • MetricsExplorer.test.tsx: 11 passed
  • targeted Prettier and ESLint passed
  • scope check: 29 changed lines

Base

rocketmq-studio at 737a7b4

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

This PR adds stable timestamp sorting to metric samples before chart rendering, ensuring chart points are drawn oldest-to-newest and the displayed latest value comes from the chronologically last sample. The sort uses index as a tiebreaker for stability.

Clean fix with good test coverage. LGTM.


Automated review by github-manager-bot

@lizhimins

Copy link
Copy Markdown
Member

Closing per contribution guideline #2107: these are fragmented one-off changes of the same theme (one PR per guard/fix/page). Please group related changes into cohesive pull requests and resubmit — your contributions are welcome in a consolidated shape.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants