diff --git a/pkg/sources/github/github.go b/pkg/sources/github/github.go index 46ddaf58341c..ce3315ed9820 100644 --- a/pkg/sources/github/github.go +++ b/pkg/sources/github/github.go @@ -59,7 +59,7 @@ type Source struct { filteredRepoCache *filteredRepoCache memberCache map[string]struct{} repoSizes repoSize - totalRepoSize int // total size in bytes of all repos + totalRepoSize int // total size of all repos in kb git *git.Git scanOptMu sync.Mutex // protects the scanOptions @@ -116,7 +116,7 @@ func (s *Source) JobID() int64 { type repoSize struct { mu sync.RWMutex - repoSizes map[string]int // size in bytes of each repo + repoSizes map[string]int // size in kb of each repo } func (r *repoSize) addRepo(repo string, size int) { @@ -775,7 +775,7 @@ func (s *Source) scan(ctx context.Context, installationClient *github.Client, ch s.setScanOptions(s.conn.Base, s.conn.Head) repoSize := s.repoSizes.getRepo(repoURL) - logger.V(2).Info(fmt.Sprintf("scanning repo %d/%d", i, len(s.repos)), "repo_size", repoSize) + logger.V(2).Info(fmt.Sprintf("scanning repo %d/%d", i, len(s.repos)), "repo_size_bytes", repoSize) now := time.Now() defer func(start time.Time) { diff --git a/pkg/sources/github/repo.go b/pkg/sources/github/repo.go index 502a897970cd..76694d409905 100644 --- a/pkg/sources/github/repo.go +++ b/pkg/sources/github/repo.go @@ -226,7 +226,7 @@ func (s *Source) processRepos(ctx context.Context, target string, listRepos repo s.repoSizes.addRepo(repoURL, r.GetSize()) s.totalRepoSize += r.GetSize() s.filteredRepoCache.Set(repoName, repoURL) - logger.V(3).Info("repo attributes", "name", repoName, "size", r.GetSize(), "repo_url", repoURL) + logger.V(3).Info("repo attributes", "name", repoName, "kb_size", r.GetSize(), "repo_url", repoURL) } if res.NextPage == 0 {