uber-go / goleak

Goroutine leak detector
MIT License
4.48k stars 148 forks source link

Make maxSleep and maxRetires configurable when building options #94

Closed kerthcet closed 1 year ago

kerthcet commented 1 year ago

Make goleak options more flexible to adapt to users' variety scenarios

Signed-off-by: Kante Yin kerthcet@gmail.com

fix https://github.com/uber-go/goleak/issues/93

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

kerthcet commented 1 year ago

cc @prashantv for review maybe?

kerthcet commented 1 year ago

@sywhang PTAL

kerthcet commented 1 year ago

Thanks @pohly , this seems need the privilege of maintainer to run the workflow. cc @sywhang @prashantv

codecov[bot] commented 1 year ago

Codecov Report

Merging #94 (717ca8e) into master (70e025e) will increase coverage by 1.59%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #94      +/-   ##
==========================================
+ Coverage   94.92%   96.52%   +1.59%     
==========================================
  Files           5        5              
  Lines         138      230      +92     
==========================================
+ Hits          131      222      +91     
- Misses          4        5       +1     
  Partials        3        3              
Impacted Files Coverage Δ
leaks.go 100.00% <100.00%> (ø)
options.go 100.00% <100.00%> (ø)
testmain.go 100.00% <0.00%> (ø)
tracestack_new.go 100.00% <0.00%> (ø)
internal/stack/stacks.go 88.73% <0.00%> (+3.31%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

prashantv commented 1 year ago

cc @prashantv for review maybe?

Sorry for the delay, as mentioned on the issue, I'm not sure we should be exposing these options, but try to capture a single option to configure retries (e.g., RetryTime). It seems like an implementation leak to expose the underlying num retries / max sleep etc.