Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Add TotalValue per profile #805

Merged
merged 9 commits into from
Jul 4, 2023
Merged

Add TotalValue per profile #805

merged 9 commits into from
Jul 4, 2023

Conversation

cyriltovena
Copy link
Collaborator

This will allow to compute value per series without having to look at every sample.

I decided to go with v2 meta since we haven't released it yet so it will break in dev. Turns out the repeatedPageIterator also works for non-repeated column :).

Copy link
Contributor

@kolesnikovae kolesnikovae left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines -368 to +372
if err := mergeByLabels(ctx, b.profiles.file, rows, m, by...); err != nil {
columnName := "TotalValue"
if b.meta.Version == 1 {
columnName = "Samples.list.element.Value"
}
if err := mergeByLabels(ctx, b.profiles.file, columnName, rows, m, by...); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

To double check: we haven't released v2 yet, so we don't need another version bump, right? My understanding is that main tip already writes blocks v2

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Correct.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

v2 is only in dev

Copy link
Collaborator

@simonswine simonswine left a comment

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from feat/sort-profiles to main July 4, 2023 11:31
@cyriltovena cyriltovena enabled auto-merge (squash) July 4, 2023 12:06
@cyriltovena cyriltovena merged commit 8cb86ac into main Jul 4, 2023
@cyriltovena cyriltovena deleted the feat/total-value-column branch July 4, 2023 12:19
simonswine pushed a commit to simonswine/pyroscope that referenced this pull request Jul 18, 2023
* Sort Profiles across row groups when flushing blocks

* Refactor and properly tests parquet reader and writer

* moar tests

* Fixes bad uint32 to int32 conversion causing maxval to be min

* add working tests back

* add missing  tests back

* improve less function for profile rows

* Adds total value per profile for building merge by series
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants