Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recording value 11 out of range 0-200 #2

Closed
kr opened this issue Nov 2, 2014 · 1 comment
Closed

recording value 11 out of range 0-200 #2

kr opened this issue Nov 2, 2014 · 1 comment

Comments

@kr
Copy link

kr commented Nov 2, 2014

I was perplexed that this

package main

import (
    "fmt"

    "github.com/codahale/hdrhistogram"
)

func main() {
    h := hdrhistogram.New(0, 200, 4)
    err := h.RecordValue(11)
    fmt.Println(err)
}

produced this

$ go run y.go 
value 11 is too large to be recorded

Then I checked the unit tests, and they all use 1 as the min. Is 1 the minimum minimum? I'm happy to send a documentation patch if you think this should be explicitly warned about.

@codahale
Copy link
Contributor

codahale commented Nov 3, 2014

No, was just an underflow on the unit magnitude. Good find, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants