This repository was archived by the owner on Jul 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rperry2174
approved these changes
Apr 24, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also for future viewers/testers worth noting that grafana/pyroscope#1935 adds example in pyroscope repo works with phlare for testing these kings of things |
petethepig
approved these changes
Apr 24, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, found a nit and a potential bug, but it's really good overall.
}() | ||
|
||
var leftTree, rightTree *tree | ||
g, gCtx := errgroup.WithContext(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
eh-am
commented
Apr 25, 2023
docs/sources/operators-guide/configure/reference-configuration-parameters/index.md
Outdated
Show resolved
Hide resolved
simonswine
pushed a commit
to simonswine/pyroscope
that referenced
this pull request
Jun 30, 2023
Given 2 trees, it generates a *querierv1.FlameGraphDiff in diff format. I preferred this way (instead of reusing Flamegraph) to make it clear its semantics and shape are the same (for example, leftTicks/rightTicks are required). Before implementing I had 2 approaches in mind: Write code to convert from phlare's tree into pyroscope's tree, then just defer to pyroscope's code. Copy the diff implementation from pyroscope OG. Ended up using the second approach, since it doesn't require an extra conversion, plus it gives us more flexibility. Added the bare minimum changes to get it working. Haven't checked performance nor anything like that. So feel free to suggest improvements :) Drawbacks It only supports positive nodes. I added an assertion at the beginning. Don't fully understand the data model, so decided to fail early and deal with it properly when we have real data that fails this assertion.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for diff:

Given 2 trees, it generates a
*querierv1.FlameGraphDiff
in diff format. I preferred this way (instead of reusingFlamegraph
) to make it clear its semantics and shape are the same (for example,leftTicks/rightTicks
are required).Before implementing I had 2 approaches in mind:
phlare's tree
intopyroscope's tree
, then just defer to pyroscope's code.Ended up using the second approach, since it doesn't require an extra conversion, plus it gives us more flexibility.
Added the bare minimum changes to get it working. Haven't checked performance nor anything like that. So feel free to suggest improvements :)
Drawbacks