uber-go / goleak

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

stack: Parse all functions #111

Closed abhinav closed 10 months ago

abhinav commented 10 months ago

Adds support to the stack parser for reading the full list of functions for a stack trace.

NOTE: This includes the function that created the stack trace; it's the bottom of the stack.

We don't maintain the order of the functions since that's not something we need at this time. The functions are all placed in a set.

This unblocks #41 (PR incoming) and allows implementing an IgnoreAnyFunction option (similar to #80 that has since stalled).

Depends on #110

codecov[bot] commented 10 months ago

Codecov Report

Merging #111 (5b4de07) into master (25cbb67) will increase coverage by 0.31%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #111      +/-   ##
==========================================
+ Coverage   98.18%   98.50%   +0.31%     
==========================================
  Files           6        6              
  Lines         276      334      +58     
==========================================
+ Hits          271      329      +58     
  Misses          4        4              
  Partials        1        1              
Files Coverage Δ
internal/stack/stacks.go 96.89% <100.00%> (+1.74%) :arrow_up:

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

abhinav commented 10 months ago

One thing that I'd really like input on is this: Should "created by" be considered part of the function stack?

I'm torn on this. It is the source of the stack, but it's not necessarily in the stack. WDYT?

CC @prashantv

abhinav commented 10 months ago

Update:

abhinav commented 10 months ago

We should set up a codecov configuration that we actually follow. This is just ignored right now.

image