From 2d2595a2e36c14d4ce35ba327cf904edc3815d58 Mon Sep 17 00:00:00 2001 From: Bill Rich Date: Mon, 7 Aug 2023 14:28:57 -0700 Subject: [PATCH] Move commits_scanned to ScanRepo (#1610) --- pkg/sources/git/git.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.go index e6ce07376..16a2e64d3 100644 --- a/pkg/sources/git/git.go +++ b/pkg/sources/git/git.go @@ -163,7 +163,7 @@ func (s *Source) Chunks(ctx context.Context, chunksChan chan *sources.Chunk) err } totalRepos := len(s.conn.Repositories) + len(s.conn.Directories) - ctx.Logger().V(1).Info("Git source finished scanning", "repo_count", totalRepos, "commits_scanned", atomic.LoadUint64(&s.git.metrics.commitsScanned)) + ctx.Logger().V(1).Info("Git source finished scanning", "repo_count", totalRepos) s.SetProgressComplete( totalRepos, totalRepos, fmt.Sprintf("Completed scanning source %s", s.name), "", @@ -640,7 +640,7 @@ func (s *Git) ScanRepo(ctx context.Context, repo *git.Repository, repoPath strin } scanTime := time.Now().Unix() - start - ctx.Logger().V(1).Info("scanning git repo complete", "repo", repoUrl, "path", repoPath, "time_seconds", scanTime) + ctx.Logger().V(1).Info("scanning git repo complete", "repo", repoUrl, "path", repoPath, "time_seconds", scanTime, "commits_scanned", atomic.LoadUint64(&s.metrics.commitsScanned)) return nil }