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

Single-valued charts #591

Closed
nblumhardt opened this issue Jun 23, 2017 · 2 comments
Closed

Single-valued charts #591

nblumhardt opened this issue Jun 23, 2017 · 2 comments
Milestone

Comments

@nblumhardt
Copy link
Member

Show one value computed over the whole dashboard range - this might not necessarily be numeric, so that things like circuit breaker status (text) can be shown.

@nblumhardt nblumhardt added this to the 4.1-pre milestone Jun 23, 2017
@nblumhardt
Copy link
Member Author

nblumhardt commented Jun 26, 2017

image

This is coming along; it's a slightly more complex feature than it first appears to be ;-)

Because queries can be expensive, and the dashboard updates frequently, single-valued charts like the one above need to use time-slice caching in order to consume a reasonable amount of resources. Behind the scenes, a new query hint for window() lets Seq know that the query results will hop forward by a certain timespan, i.e. the dashboard interval, so future requests for the same query can re-use partial results.

In 4.1, this will only be used by the dashboard, but a future version might enable this transparently for some queries since the performance difference is substantial.

Remaining work:

  • Result modifications - count(*) + 1, Round(min(Elapsed), 2) - etc.
  • Get some troublemakers - first(), last(), mean(), percentile() and count(distinct()) - working smoothly
  • Orderings

Once this is done, we'll also have a strong foundation to efficiently build rowset-value charts, pie charts and so-on.

@nblumhardt
Copy link
Member Author

Done! The for window() hint makes some pretty aggressive caching possible.

Bare query (debug build):

image

First run with time slice caching enabled, as used for single-valued charts on the dashboard (slight slow-down):

image

Subsequent run - 650× faster than the bare query:

image

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

No branches or pull requests

1 participant