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

Fix issue #154: Add ability to change sampling rate #190

Merged
merged 3 commits into from
May 24, 2021

Conversation

alonlong
Copy link
Contributor

make the sample rate configured for python, ruby and go, but it doesn't take affect for go, because we use the the 'runtime profile' of golang, we need to find the way to build the customer profiler for go.

@alonlong alonlong added the backend Mostly go code label May 16, 2021
@alonlong alonlong requested a review from petethepig May 16, 2021 03:07
@CLAassistant
Copy link

CLAassistant commented May 16, 2021

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot requested a review from Rperry2174 May 16, 2021 03:07
@codecov
Copy link

codecov bot commented May 16, 2021

Codecov Report

Merging #190 (0a67343) into main (fc51463) will decrease coverage by 0.14%.
The diff coverage is 41.94%.

❗ Current head 0a67343 differs from pull request most recent head 23cab12. Consider uploading reports for the commit 23cab12 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #190      +/-   ##
==========================================
- Coverage   57.26%   57.12%   -0.13%     
==========================================
  Files          73       73              
  Lines        2936     2957      +21     
==========================================
+ Hits         1681     1689       +8     
- Misses       1112     1122      +10     
- Partials      143      146       +3     
Impacted Files Coverage Δ
pkg/agent/gospy/gospy.go 22.00% <0.00%> (-2.48%) ⬇️
pkg/agent/profiler/profiler.go 0.00% <0.00%> (ø)
pkg/storage/segment/segment.go 89.26% <ø> (ø)
pkg/storage/storage.go 71.21% <ø> (ø)
pkg/storage/tree/flamebearer.go 100.00% <ø> (ø)
pkg/server/ingest.go 62.17% <14.29%> (-3.05%) ⬇️
pkg/cli/cli.go 55.86% <54.55%> (-0.05%) ⬇️
pkg/agent/session.go 63.94% <100.00%> (ø)
pkg/agent/upstream/remote/remote.go 64.79% <100.00%> (ø)
pkg/exec/cli.go 40.00% <100.00%> (+0.66%) ⬆️
... and 2 more

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 fc51463...23cab12. Read the comment docs.

@petethepig petethepig changed the title fixe issue #154: Add ability to change sampling rate Fixes issue #154: Add ability to change sampling rate May 16, 2021
@alonlong alonlong changed the title Fixes issue #154: Add ability to change sampling rate Fix issue #154: Add ability to change sampling rate May 16, 2021
pkg/config/config.go Outdated Show resolved Hide resolved
var DefaultProfileTypes = []ProfileType{ProfileCPU, ProfileAllocObjects, ProfileAllocSpace, ProfileInuseObjects, ProfileInuseSpace}

type Config struct {
ApplicationName string // e.g backend.purchases
ServerAddress string // e.g http://pyroscope.services.internal:4040
AuthToken string // specify this token when using pyroscope cloud
SampleRate uint32
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
SampleRate uint32
// SampleRate uint32

I think we should comment this out until we implement golang profiler support (#191)

…r defining the common const or variables; 3. make the spyname to a const variable
@petethepig petethepig added this to In progress in Pyroscope Public Roadmap May 17, 2021
@petethepig petethepig moved this from In progress to In Review in Pyroscope Public Roadmap May 21, 2021
@petethepig petethepig merged commit 2c4acf6 into main May 24, 2021
@petethepig petethepig deleted the feature/simpling_rate branch May 24, 2021 23:08
@petethepig petethepig moved this from In Review to Done in Pyroscope Public Roadmap May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Mostly go code
Development

Successfully merging this pull request may close these issues.

None yet

3 participants