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

InfluxDB 09: Feature Request: JSON time values as epoch numbers instead of date strings #2599

Closed
torkelo opened this issue May 18, 2015 · 5 comments
Assignees
Milestone

Comments

@torkelo
Copy link

torkelo commented May 18, 2015

I am not sure this is possible now. But it would be good to have an option to return epochs instead of full JSON Date strings.

Reduces the response size and parse speed for browsers.

image

In InfluxDB 0.8 it was epochs not sure why this was changed. It is not a big issue for me, but would be a nice to have.

@pauldix
Copy link
Member

pauldix commented May 19, 2015

For response size, GZIP should help with that. What are you seeing in terms of the network traffic?

On parse speeds, do you have any numbers of parsing date strings vs. epochs?

This can probably be added at some point without too much work. Just curious what the level of pain is on this feature.

@torkelo
Copy link
Author

torkelo commented May 19, 2015

I do not have any benchmarks or stats but can imagine that the deserialization will take longer and take more memory. Also worried about memory in general, grafana slows down during browser GC and so need to conserve memory :)

@beckettsean beckettsean added this to the Next Point Release milestone May 19, 2015
@dswarbrick
Copy link

Date string parsing is 46% slower than epoch numbers, on my browser - http://jsperf.com/date-parsing-string-vs-epoch-number

@pauldix
Copy link
Member

pauldix commented May 24, 2015

This seems pretty easy to do and I know we have a few cycles while waiting for me to finish some query engine refactoring for the new clustering design. @dgnorton, can you have a look?

I'm thinking this should be done through a single query parameter named epoch. For instance epoch=ms, which would tell us to return all times as millisecond scale epochs.

Should support ms, us - micro, ns - nano, and s - second.

@pauldix pauldix modified the milestones: 0.9.0, Next Point Release May 24, 2015
@torkelo
Copy link
Author

torkelo commented May 24, 2015

That sounds great.

dgnorton added a commit that referenced this issue May 27, 2015
dgnorton added a commit that referenced this issue May 27, 2015
dgnorton added a commit that referenced this issue May 27, 2015
dgnorton added a commit that referenced this issue May 28, 2015
@dgnorton dgnorton removed the review label May 28, 2015
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

5 participants