MCPcopy
hub / github.com/git-lfs/git-lfs / Meter

Struct Meter

tq/meter.go:23–42  ·  view source on GitHub ↗

Meter provides a progress bar type output for the TransferQueue. It is given an estimated file count and size up front and tracks the number of files and bytes transferred as well as the number of files and bytes that get skipped because the transfer is unnecessary.

Source from the content-addressed store, hash-verified

21// files and bytes transferred as well as the number of files and bytes that
22// get skipped because the transfer is unnecessary.
23type Meter struct {
24 finishedFiles int64 // int64s must come first for struct alignment
25 transferringFiles int64
26 estimatedBytes int64
27 lastBytes int64
28 currentBytes int64
29 sampleCount uint64
30 avgBytes float64
31 lastAvg time.Time
32 estimatedFiles int32
33 paused uint32
34 fileIndex map[string]int64 // Maps a file name to its transfer number
35 fileIndexMutex *sync.Mutex
36 updates chan *tasklog.Update
37 cfg *config.Configuration
38
39 DryRun bool
40 Logger *tools.SyncWriter
41 Direction Direction
42}
43
44type env interface {
45 Get(key string) (val string, ok bool)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected