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

Support histograms in pkg/frontend #4377

Merged
merged 6 commits into from
Mar 7, 2023
Merged

Support histograms in pkg/frontend #4377

merged 6 commits into from
Mar 7, 2023

Conversation

codesome
Copy link
Member

@codesome codesome commented Mar 6, 2023

What this PR does

Syncs that changes in pkg/frontend from sparsehistogram branch.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@codesome codesome marked this pull request as ready for review March 6, 2023 10:07
@codesome codesome requested a review from a team as a code owner March 6, 2023 10:07
@codesome codesome requested a review from krajorama March 6, 2023 10:08
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Copy link
Contributor

@krajorama krajorama left a comment

Choose a reason for hiding this comment

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

Two nits. Looks good overall, I want to run a little benchmarking on the generics though

pkg/frontend/querymiddleware/codec.go Outdated Show resolved Hide resolved
pkg/frontend/querymiddleware/codec.go Outdated Show resolved Hide resolved
krajorama and others added 4 commits March 7, 2023 09:44
Generics double the time for running the filter due to using
interface mechanism to get to the GetTimestampVal() function.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Turns out this takes double the time due to the function getting
the timestamp being invoked through interface semantics in Go.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Copy link
Contributor

@krajorama krajorama left a comment

Choose a reason for hiding this comment

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

LGTM

# Conflicts:
#	pkg/frontend/querymiddleware/results_cache_test.go
@krajorama krajorama enabled auto-merge (squash) March 7, 2023 22:03
@krajorama krajorama merged commit c568e85 into main Mar 7, 2023
@krajorama krajorama deleted the codesome/sync-frontend branch March 7, 2023 22:12
set = append(set, series.NewConcreteSeries(mimirpb.FromLabelAdaptersToLabels(stream.Labels), samples, nil))
// same logic as samples above
histograms := make([]mimirpb.Histogram, 0) //, len(stream.Histograms)+10)
/* // for now we will disable query sharding for tenants who enable native histograms, as the changes to support query sharding with native histograms is non-trivial
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest to not merge commented code.

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

Successfully merging this pull request may close these issues.

3 participants