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

timechart: support data-driven time range #52

Open
go-oleg opened this issue Feb 12, 2016 · 6 comments
Open

timechart: support data-driven time range #52

go-oleg opened this issue Feb 12, 2016 · 6 comments

Comments

@go-oleg
Copy link
Contributor

go-oleg commented Feb 12, 2016

Currently, the time range of a timechart is driven by the -from/-to/-last supplied to the juttle sources that eventually end up feeding points into it. The idea behind this that if you request a time range of 1 day but only have data for the middle 12 hours, we want to make it clear that there was no data for the first 6 hours and the last 6 hours.

However, it is somewhat common to do a juttle query across a very wide time range because you have little upfront knowledge about where this data is located. In this case, you do want the chart to only show the data instead of days (or possibly years) of no data.

This is a proposal to add an option to timechart that will drive whether the time range should be determined by the range of the data or the range of -from/-to/-last.

Proposed names:

// a flag that controls whether data or time should be used for the range
-timeRange 'data'|'time'

// honor the same options that juttle sources support,
// a user would have to put the same values into the source and timechart
`-from/-to/-last`

cc @demmer @dmehra

@demmer
Copy link
Contributor

demmer commented Feb 12, 2016

Is the idea that we would no longer calculate _jut_time_bounds and send to the chart?

@go-oleg
Copy link
Contributor Author

go-oleg commented Feb 12, 2016

If the user explicitly specified -from and -to to the chart, then yes we would no longer need them (would need to revisit how we determine if a chart live is since not specifying -from and -to doesn't necessarily mean its live). The -timeRange option would still require _jut_time_bounds.

@dmehra
Copy link

dmehra commented Feb 12, 2016

How will this play with -duration? Would we drop that parameter?

@go-oleg
Copy link
Contributor Author

go-oleg commented Feb 12, 2016

Right now -duration is geared towards live timecharts even though it happens to work with historical ones. I think we would need to keep both (-from/-to and -duration).

@dmehra
Copy link

dmehra commented Feb 12, 2016

The interplay with -duration still seems confusing, would it be applied on top of the -from/-to or be exclusive? Should we perhaps merge in the logic, drop -duration and have this:

-timeRange 'data'|'time'|'live'
-from/-to/-last

So if you specify -timeRange 'live' -last :1 hour: then you get the equivalent of current -duration :1 hour:?

Not sure what the time overlay mode would do, then; maybe -duration is kept just for that? Or maybe we cover that as well with -timeRange 'overlay'?..

@mstemm
Copy link

mstemm commented Feb 17, 2016

+1 for this feature.

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

4 participants