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

Small refactor and bump github.com/samber/lo #3473

Closed
wants to merge 2 commits into from

Conversation

bryanhuhta
Copy link
Contributor

No description provided.

@bryanhuhta bryanhuhta self-assigned this Aug 9, 2024
@bryanhuhta bryanhuhta requested a review from a team as a code owner August 9, 2024 15:12
@simonswine
Copy link
Contributor

@bryanhuhta Nice work! I wonder if this will have any performance impact?

@@ -29,7 +29,7 @@ func NewFlameGraph(t *Tree, maxNodes int64) *querierv1.FlameGraph {

minVal := t.minValue(maxNodes)

stack := stackNodePool.Get().(*Stack[stackNode])
stack := getNodeStackPool().Get().(*Stack[stackNode])
Copy link
Collaborator

Choose a reason for hiding this comment

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

I dont get it. Does this create a fresh pool and fresh stack every time?

Copy link
Collaborator

Choose a reason for hiding this comment

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

image

Copy link
Contributor

github-actions bot commented Aug 9, 2024

Benchmark Report

Finished
no benchmarks to run

@bryanhuhta bryanhuhta closed this Aug 9, 2024
@bryanhuhta bryanhuhta deleted the refactor-flamegraph branch August 9, 2024 15:17
@bryanhuhta bryanhuhta restored the refactor-flamegraph branch August 9, 2024 15:19
@simonswine
Copy link
Contributor

@pyrobench BenchmarkFlamegraph

Copy link
Contributor

github-actions bot commented Aug 9, 2024

Benchmark Report

Finished
1fafaea -> c515fd7 (compare)

github.com/grafana/pyroscope/pkg/model.BenchmarkFlamegraph(cpu (sec/op)=9.27 %, alloc_space (B/op)=21.45 %, alloc_objects (allocs/op)=14.54 %)
Resource Base Head Diff %
cpu (sec/op) 691.926 µs 756.079 µs 9.27 %
alloc_space (B/op) 722 KiB 877 KiB 21.45 %
alloc_objects (allocs/op) 110 126 14.54 %

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