Re: [PATCH] Change min/max to float numbers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2025-02-07 at 11:20 -0300, Rafael Folco wrote:
> On 06/02/25 18:23, Crystal Wood wrote:
> > On Thu, 2025-02-06 at 12:02 -0300, Rafael Folco wrote:
> > > On 06/02/25 09:00, Sebastian Andrzej Siewior wrote:
> > > > On 2025-02-06 06:16:22 [-0300], Rafael Folco wrote:
> > > > > Make min/max consistent with avg by recording the latency samples
> > > > > as float numbers instead of integers.
> > > > 
> > > > Why?
> > > 
> > > - More precise numbers of Max/Min for extreme low latency cases
> > > - Distinguish zero latency in bucket 001 (us)
> > > - Distinguish values from upper/lower boundaries in a bucket
> > > - Clarify confusion on average (round up) vs maximum in the next bucket (casting)
> > 
> > If you want more precision, set --bucket-width to something lower than
> > 1000 ns.  That will cause everything to be reported with ns precision
> > (though maybe not quite ns accuracy, depending on the hardware).  We
> > were hesitant to make ns precision the default in case it misleads
> > people about the accuracy (plus I didn't know if the change might
> > confuse some tools that consume the output).
> Yes, it works for precision. Average is higher than max with default bucket width, though.

This is due to the average being calculated from the histogram (rounding
to the top of the bucket), while min/max is the direct value.  Maybe we
should keep a running total to compute average from?

We may also want to think about whether we should unconditionally use
ns.

-Crystal






[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux