Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Aug 31, 2024

Description

Unit rate display in metrics has some issues. This PR:

  • Adds space between per and unit, e.g. per second
  • Doesn't pluralize rate unit
  • Adds tests

After:
image

Fixes #5496

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
      • Link to aspire-docs issue:
    • No
Microsoft Reviewers: Open in CodeFlow

@leidegre
Copy link

Will this also address the Y axis, will bytes per second show up as, for example 500MB/s? If that's what's suitable for the range/domain.

@JamesNK
Copy link
Member Author

JamesNK commented Aug 31, 2024

Will this also address the Y axis, will bytes per second show up as, for example 500MB/s? If that's what's suitable for the range/domain.

Do you mean the tooltip? The unit in the tooltip is the same as the graph legend:

image

@leidegre
Copy link

leidegre commented Sep 1, 2024

@JamesNK I was hoping for something like this

image

@JamesNK
Copy link
Member Author

JamesNK commented Sep 1, 2024

We wouldn't do that because the unit can be long. If we changed the graph to have the unit on the axis it would be displayed vertically.

For example, https://plotly.com/javascript/line-charts/#graph-and-axes-titles

image

A change like this would be done in a separate issue/PR. This one is just fixing the axis name.

@adamint adamint merged commit e385e00 into main Sep 3, 2024
11 checks passed
@adamint adamint deleted the jamesnk/chart-unit-rate branch September 3, 2024 15:43
@github-actions github-actions bot locked and limited conversation to collaborators Oct 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rate metrics are not displayed properly
3 participants