Skip to content

UI: Remaining requests percentage displays unrounded floating-point value #1726

Description

@miguel11nines

Describe the bug

The "Remaining reqs." percentage in the UI displays unrounded floating-point values with excessive decimal places.
Example:
Remaining reqs.: 58.666666666666664%
Expected:
Remaining reqs.: 59%

Root Cause

The percentage is computed from integer division (e.g. remaining / total * 100) but the result is rendered directly without rounding, exposing IEEE 754 floating-point representation artifacts.

Suggested Fix

Round the percentage before display:

- `Remaining reqs.: ${(remaining / total * 100)}%`
+ `Remaining reqs.: ${Math.round(remaining / total * 100)}%`

### Affected version

v0.0.419

### Steps to reproduce the behavior

1. You can see it at the bottom right 
Remaining reqs.: 58.666666666666664%

### Expected behavior

Remaining reqs.: 58.67%

### Additional context

_No response_

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:terminal-renderingDisplay and rendering: flickering, scrolling, line wrapping, output formatting

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions