Config for pprof block and mutex#3655
Conversation
aeb263f to
11ed3e3
Compare
11ed3e3 to
725ec06
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| // Normalize normalizes x fields. | ||
| func (x *Pprof) Normalize() { | ||
| if x.Address == "" { | ||
| x.Address = "localhost:6060" |
There was a problem hiding this comment.
Create a default variable to use in the test, as we do in other config packages.
There was a problem hiding this comment.
i dont think test should use these variable. Instead, it should assert exact value
There was a problem hiding this comment.
I meant the default value constants.
There was a problem hiding this comment.
i know. Having this
asserts that config defaults to some variable. Instead, i wanna assert exact value
There was a problem hiding this comment.
as we do in other config packages
i am always for this approach, we either agree with what we do or we need to change it everywhere if we think that it is wrong (or an issue)
asserts that config defaults to some variable
imo, that is what is needed: package export some variable that says what value is used if no config values are found, and test asserts it. what bothers you?
There was a problem hiding this comment.
what bothers you?
if i change var value, nothing breaks. Although it should
725ec06 to
1927a55
Compare
There was no way to enable these profiles before. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
1927a55 to
12723de
Compare
To distinguish between default and configuration Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
No description provided.