google / pprof

pprof is a tool for visualization and analysis of profiling data
Apache License 2.0
8.03k stars 608 forks source link

Fix flamegraph name matching. #796

Closed ghemawat closed 1 year ago

ghemawat commented 1 year ago

Previously, we were using the same regexp to match both a node's FunctionName (for server-side filtering) and UniqueName (for browser-side pivoting). However the two strings can differ (UniqueName can end with a # in case of overloads). This resulted in us being unable to ignore/focus/hide overloaded functions.

We now use distinct regexps for the two different use cases. And we no longer compute the regexps in Go. Instead we do this in Javascript using the pre-existing quotemeta function.

The quotemeta function has now been moved to the top-level and renamed to pprofQuoteMeta.

codecov-commenter commented 1 year ago

Codecov Report

Merging #796 (142c5b3) into main (9131a7e) will decrease coverage by 0.01%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #796      +/-   ##
==========================================
- Coverage   66.99%   66.99%   -0.01%     
==========================================
  Files          45       45              
  Lines        9862     9861       -1     
==========================================
- Hits         6607     6606       -1     
  Misses       2795     2795              
  Partials      460      460              

see 1 file with indirect coverage changes