Skip to content

Consistent index error on Windows #72

@kqr

Description

@kqr

When initialising the following LongHistogram

var measurements = new LongHistogram((long) TimeSpan.FromMinutes(15).TotalMilliseconds, 3);

and then in a continuous loop add measurements to it with

measurements.RecordValue(actual - expected);

I consistently get the following exception:

 Index was outside the bounds of the array.
Stack Trace:
   at HdrHistogram.Utilities.Bitwise.Log2(Int32 i)
   at HdrHistogram.Utilities.Bitwise.NumberOfLeadingZeros(Int64 value)
   at HdrHistogram.HistogramBase.RecordSingleValue(Int64 value)

Could this be because actual - expected can be negative – or 0? I had assumed HdrHistogram handled that, but I realise now I might have been incorrect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions