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

Granularity: Introduce primitive-typed bucketStart, increment methods. #10904

Merged
merged 3 commits into from Feb 25, 2021

Conversation

gianm
Copy link
Contributor

@gianm gianm commented Feb 19, 2021

Saves creation of unnecessary DateTime objects in timestamp_floor and
timestamp_ceil expressions.

I was running a query that had a group by floor(__time to year) in it and was greeted by the following flame graph:

image

33% of the time is spent on DateTime.<init>. It's not necessary, because the PeriodGranularity code is doing the hard work on the primitive milliseconds.

Saves creation of unnecessary DateTime objects in timestamp_floor and
timestamp_ceil expressions.
Copy link
Member

@clintropolis clintropolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 🤘

@gianm
Copy link
Contributor Author

gianm commented Feb 25, 2021

It looks like the CI failure was in the coverage checker. I pushed a new patch that improves test coverage.

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

Successfully merging this pull request may close these issues.

None yet

2 participants