Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Statistics ¶
type Statistics struct { TotalDownloads int `json:"totalDownloads"` TotalDownloaded int `json:"totalDownloaded"` TotalFailed int `json:"totalFailed"` TotalDownloadedBytes uint64 `json:"totalDownloadedBytes"` AverageSpeedFilesPerSec float64 `json:"averageSpeedFilesPerSec"` SpeedBytesPerSec float64 `json:"speedBytesPerSec"` StartTime time.Time `json:"startTime"` FilesRemaining int `json:"filesRemaining"` AverageSpeedBytesPerSec float64 `json:"averageSpeedBytesPerSec"` // contains filtered or unexported fields }
Statistics - statistics about the downloads
func New ¶
func New() Statistics
New returns a new Statistics instance with start time the current time
func (*Statistics) PrintEnd ¶
func (stats *Statistics) PrintEnd()
PrintEnd is called on program exit and prints some useful final stats
func (*Statistics) PrintHeader ¶
func (stats *Statistics) PrintHeader()
PrintHeader prints the header of the statistics
func (*Statistics) Update ¶
func (stats *Statistics) Update(log logging.LogEntry)
Update updates the statistics from a new log entry
Click to show internal directories.
Click to hide internal directories.