(ctx context.Context, st *snapshot.Stats, included, excluded upload.SampleBuckets, excludedDirs []string, final bool)
| 37 | } |
| 38 | |
| 39 | func (p estimateTaskProgress) Stats(ctx context.Context, st *snapshot.Stats, included, excluded upload.SampleBuckets, excludedDirs []string, final bool) { |
| 40 | _ = excludedDirs |
| 41 | _ = final |
| 42 | |
| 43 | p.ctrl.ReportCounters(map[string]uitask.CounterValue{ |
| 44 | "Bytes": uitask.BytesCounter(atomic.LoadInt64(&st.TotalFileSize)), |
| 45 | "Excluded Bytes": uitask.BytesCounter(atomic.LoadInt64(&st.ExcludedTotalFileSize)), |
| 46 | "Files": uitask.SimpleCounter(int64(atomic.LoadInt32(&st.TotalFileCount))), |
| 47 | "Directories": uitask.SimpleCounter(int64(atomic.LoadInt32(&st.TotalDirectoryCount))), |
| 48 | "Excluded Files": uitask.SimpleCounter(int64(atomic.LoadInt32(&st.ExcludedFileCount))), |
| 49 | "Excluded Directories": uitask.SimpleCounter(int64(atomic.LoadInt32(&st.ExcludedDirCount))), |
| 50 | "Errors": uitask.ErrorCounter(int64(atomic.LoadInt32(&st.ErrorCount))), |
| 51 | "Ignored Errors": uitask.ErrorCounter(int64(atomic.LoadInt32(&st.IgnoredErrorCount))), |
| 52 | }) |
| 53 | |
| 54 | if final { |
| 55 | logBucketSamples(ctx, included, "Included", false) |
| 56 | logBucketSamples(ctx, excluded, "Excluded", true) |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | func logBucketSamples(ctx context.Context, buckets upload.SampleBuckets, prefix string, showExamples bool) { |
| 61 | hasAny := false |
nothing calls this directly
no test coverage detected