From ff878d3e0bef95566a2b4c37eeeef0ecd3e2c6d7 Mon Sep 17 00:00:00 2001 From: Victor Pfautz Date: Fri, 29 Nov 2024 07:51:41 -0800 Subject: [PATCH] Add wall time to extractor and vulnsunset scalibr run PiperOrigin-RevId: 701288908 --- extractor/filesystem/filesystem.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extractor/filesystem/filesystem.go b/extractor/filesystem/filesystem.go index 2b970d47..dc07ece4 100644 --- a/extractor/filesystem/filesystem.go +++ b/extractor/filesystem/filesystem.go @@ -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 }