Skip to content

Commit

Permalink
Add wall time to extractor and vulnsunset scalibr run
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 701288908
  • Loading branch information
vpasdf authored and copybara-github committed Nov 29, 2024
1 parent 35e2d56 commit ff878d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions extractor/filesystem/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,10 @@ func RunFS(ctx context.Context, config *Config, wc *walkContext) ([]*extractor.I
close(quit)
}

log.Infof("End status: %d dirs visited, %d inodes visited, %d Extract calls, %s elapsed",
wc.dirsVisited, wc.inodesVisited, wc.extractCalls, time.Since(start))
// On Windows, elapsed and wall time are probably the same. On Linux and Mac they are different,
// if Scalibr was suspended during runtime.
log.Infof("End status: %d dirs visited, %d inodes visited, %d Extract calls, %s elapsed, %s wall time",
wc.dirsVisited, wc.inodesVisited, wc.extractCalls, time.Since(start), time.Duration(time.Now().UnixNano()-start.UnixNano()))

return wc.inventory, errToExtractorStatus(config.Extractors, wc.foundInv, wc.errors), err
}
Expand Down

0 comments on commit ff878d3

Please sign in to comment.