AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

Round elapsed values below 1ms to one decimal place

Open agneevX opened this issue 2 years ago • 6 comments

Prerequisites

  • [x] I am running the latest version
  • [x] I checked the documentation and found no answer
  • [ ] I checked to make sure that this issue has not already been filed

Problem Description

Cached queries often take sub-1ms to process. The UI shows such values in two decimal places.

image

The extra precision is not really needed and it would otherwise look better and cleaner.

Proposed Solution

Round values below 1ms to one decimal place. E.g. 0.45 ms to 0.5 ms.

Alternatives Considered

Additional Information

agneevX avatar May 01 '22 08:05 agneevX

I see cache responses around 0.08 ms. Reducing the number of decimals would make those look like 0.0 ms as in 'no time' or rounded up to 0.1 which both would be misleading.

Also it is an indication of how well my box is performing. When I see a lot in the tenths I know that something is consuming a lot of resources. Personally I like it the way it is now.

fvdm avatar May 02 '22 09:05 fvdm

@fvdm Guess a special concession could be made for you ;)

agneevX avatar May 02 '22 10:05 agneevX

Agreeing with @fvdm .

hnnweb avatar May 02 '22 14:05 hnnweb

On the one hand, it would indeed look better on the UI. But on the other, I'm not a big fan of hiding information. Perhaps the top-level log should be rounded, but the full information about the request should contain a more precise reading. We'll see.

ainar-g avatar May 04 '22 12:05 ainar-g

@ainar-g Yeah. Maybe an precision option in the Query Log settings for the UI and the numbers with two decimals in the API response.

fvdm avatar May 04 '22 13:05 fvdm

Added a feature request label to avoid the bot.

ainar-g avatar Sep 21 '22 11:09 ainar-g