{"action":"created","issue":{"url":"https://api.github.com/repos/prometheus/client_java/issues/304","repository_url":"https://api.github.com/repos/prometheus/client_java","labels_url":"https://api.github.com/repos/prometheus/client_java/issues/304/labels{/name}","comments_url":"https://api.github.com/repos/prometheus/client_java/issues/304/comments","events_url":"https://api.github.com/repos/prometheus/client_java/issues/304/events","html_url":"https://github.com/prometheus/client_java/pull/304","id":267958209,"number":304,"title":"Add preferred numbers for histogram buckets","user":{"login":"bharrisau","id":119958,"avatar_url":"https://avatars0.githubusercontent.com/u/119958?v=4","gravatar_id":"","url":"https://api.github.com/users/bharrisau","html_url":"https://github.com/bharrisau","followers_url":"https://api.github.com/users/bharrisau/followers","following_url":"https://api.github.com/users/bharrisau/following{/other_user}","gists_url":"https://api.github.com/users/bharrisau/gists{/gist_id}","starred_url":"https://api.github.com/users/bharrisau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bharrisau/subscriptions","organizations_url":"https://api.github.com/users/bharrisau/orgs","repos_url":"https://api.github.com/users/bharrisau/repos","events_url":"https://api.github.com/users/bharrisau/events{/privacy}","received_events_url":"https://api.github.com/users/bharrisau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-24T09:23:32Z","updated_at":"2017-10-25T10:03:33Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/prometheus/client_java/pulls/304","html_url":"https://github.com/prometheus/client_java/pull/304","diff_url":"https://github.com/prometheus/client_java/pull/304.diff","patch_url":"https://github.com/prometheus/client_java/pull/304.patch"},"body":"This change adds a helper method for creating buckets following the preferred number style. It is similar to exponential buckets, but limits the significant figures in the output. Using 6 buckets per decade limits the relative error to 20% (https://en.wikipedia.org/wiki/E-series_of_preferred_numbers)\r\n\r\nhttps://en.wikipedia.org/wiki/Preferred_number\r\n"},"comment":{"url":"https://api.github.com/repos/prometheus/client_java/issues/comments/339280254","html_url":"https://github.com/prometheus/client_java/pull/304#issuecomment-339280254","issue_url":"https://api.github.com/repos/prometheus/client_java/issues/304","id":339280254,"user":{"login":"bharrisau","id":119958,"avatar_url":"https://avatars0.githubusercontent.com/u/119958?v=4","gravatar_id":"","url":"https://api.github.com/users/bharrisau","html_url":"https://github.com/bharrisau","followers_url":"https://api.github.com/users/bharrisau/followers","following_url":"https://api.github.com/users/bharrisau/following{/other_user}","gists_url":"https://api.github.com/users/bharrisau/gists{/gist_id}","starred_url":"https://api.github.com/users/bharrisau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bharrisau/subscriptions","organizations_url":"https://api.github.com/users/bharrisau/orgs","repos_url":"https://api.github.com/users/bharrisau/repos","events_url":"https://api.github.com/users/bharrisau/events{/privacy}","received_events_url":"https://api.github.com/users/bharrisau/received_events","type":"User","site_admin":false},"created_at":"2017-10-25T10:03:33Z","updated_at":"2017-10-25T10:03:33Z","author_association":"NONE","body":"Hmm, a couple of differences to come mind:\r\n- User doesn't need to enter the fifth root of 10 as the exponential factor\r\n- User can reason about how wide a range the histogram covers - they could get a calculator and do `start * exp ^ count`, but this way if you set count to some factor of buckets, then you know how many decades it covers (e.g. buckets = 5, count = 15, start = 0.1 -> then end is going to be up to 100)\r\n- If User previously was starting from 100ms but then wanted to do 10ms, this way keeps the larger buckets static so they don't lose all the data\r\n- Potential performance improvement on prometheus due to less `le_X` labels. The exponential creates longer labels, and if any variable are different then there is no overlap with other series's labels.\r\n\r\nPotential questions to improve this would be:\r\n- Should there be an `end` instead of a `count`? Then the range is even more explicit.\r\n\r\nI could find a different term than `preferred` if needed. It's just the term for using this style of number."}}
{"actor":{"display_login":"bharrisau"}}