stats Module

Statistics.

class wpull.stats.Statistics(url_table: typing.Union=None)[source]

Bases: object

Statistics.

start_time

float

Timestamp when the engine started.

stop_time

float

Timestamp when the engine stopped.

files

int

Number of files downloaded.

size

int

Size of files in bytes.

errors

a Counter mapping error types to integer.

quota

int

Threshold of number of bytes when the download quota is exceeded.

bandwidth_meter

network.BandwidthMeter

The bandwidth meter.

duration

Return the time in seconds the interval.

increment(size: int)[source]

Increment the number of files downloaded.

Parameters:size – The size of the file
increment_error(error: Exception)[source]

Increment the error counter preferring base exceptions.

is_quota_exceeded

Return whether the quota is exceeded.

start()[source]

Record the start time.

stop()[source]

Record the stop time.