Skip to content

Commit

Permalink
Improve profile filter unit tests, fix show filtering of mappings (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
lvng authored and aalexand committed Apr 11, 2018
1 parent 2c64079 commit 6167805
Show file tree
Hide file tree
Showing 2 changed files with 375 additions and 34 deletions.
3 changes: 3 additions & 0 deletions profile/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ func (loc *Location) unmatchedLines(re *regexp.Regexp) []Line {
// matchedLines returns the lines in the location that match
// the regular expression.
func (loc *Location) matchedLines(re *regexp.Regexp) []Line {
if m := loc.Mapping; m != nil && re.MatchString(m.File) {
return loc.Line
}
var lines []Line
for _, ln := range loc.Line {
if fn := ln.Function; fn != nil {
Expand Down
Loading

0 comments on commit 6167805

Please sign in to comment.