Skip to content

Add a POST handler for render-diff #338

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

Merged
merged 6 commits into from
Aug 23, 2021
Merged

Conversation

yashrsharma44
Copy link
Contributor

@yashrsharma44 yashrsharma44 commented Aug 16, 2021

Added a POST handler for /render-diff
Fixes #321

Verification

Verified the endpoint using Postman -

  • Request Body
{
	"query":"pyroscope.server.alloc_objects{}",
	"from":"now-1h",
	"until":"now",
	"max-nodes":1024,
	"left-params" : {
		"from":"1629120696",
		"until":"1629121946"
	},
	"right-params" : {
		"from":"now-30m",
		"until":"now"
	},
	"format":"json"
}

TODO -

  • Tests for POST method

Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
@codecov
Copy link

codecov bot commented Aug 16, 2021

Codecov Report

Merging #338 (9c56b06) into main (615e268) will increase coverage by 0.55%.
The diff coverage is 52.24%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #338      +/-   ##
==========================================
+ Coverage   53.93%   54.47%   +0.55%     
==========================================
  Files         102      102              
  Lines        4781     4834      +53     
==========================================
+ Hits         2578     2633      +55     
+ Misses       1964     1951      -13     
- Partials      239      250      +11     
Impacted Files Coverage Δ
pkg/server/controller.go 31.64% <33.34%> (ø)
pkg/server/render.go 63.06% <53.13%> (+20.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 615e268...9c56b06. Read the comment docs.

Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
@yashrsharma44 yashrsharma44 marked this pull request as ready for review August 17, 2021 06:34
Copy link
Collaborator

@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.

Looks good! I've left a couple of notes, please take a look :)

… handler

Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
Signed-off-by: Yash Sharma <yashrsharma44@gmail.com>
Copy link
Collaborator

@petethepig petethepig left a comment

Choose a reason for hiding this comment

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

Looks good, merging

@petethepig petethepig merged commit f3186f4 into grafana:main Aug 23, 2021
korniltsev pushed a commit that referenced this pull request Jul 18, 2023
korniltsev pushed a commit that referenced this pull request Jul 18, 2023
This is because the mapping ID is set to 0 on the locations.

It also adds an uncompressed profile that should be solved by #338.
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.

Separate 'comparison' endpoint from 'diff' endpoint
3 participants