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

Add histogram aggregate function #59

Closed
pauldix opened this issue Nov 15, 2013 · 1 comment
Closed

Add histogram aggregate function #59

pauldix opened this issue Nov 15, 2013 · 1 comment

Comments

@pauldix
Copy link
Member

pauldix commented Nov 15, 2013

Users should be able to get histograms of values over time. Like this:

select histogram(value, 100) from response_times
group by time(1h) where time > now() - 24h

That query would give you 24 different histograms for each hour where the bucket size of the histogram is 100 milliseconds (assuming that the value column is milliseconds). The response would look something like this:

[{
  "name": "response_times",
  "columns": ["time", "bucket_start", "count"],
  "points": [
    [1384535484, 0, 2],
    [1384535484, 100, 5],
    [1384535484, 200, 23],
    [1384535484, 300, 1],
    [1384531884, 0, 2],
    ...
  ]
}]

So there are multiple points per 1 hour interval where each point represents a bucket in the histogram.

@obfuscurity
Copy link

🔥

jvshahid pushed a commit that referenced this issue Aug 12, 2014
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