Module statistics

Source
Expand description

Structs to collect and keep tracker metrics.

The tracker collects metrics such as:

  • Number of connections handled
  • Number of announce requests handled
  • Number of scrape request handled

These metrics are collected for each connection type: UDP and HTTP and also for each IP version used by the peers: IPv4 and IPv6.

Notice: that UDP tracker have an specific connection request. For the HTTP metrics the counter counts one connection for each announce or scrape request.

The data is collected by using an event-sender -> event listener model.

The tracker uses an statistics::EventSender instance to send an event. The statistics::Keeper listens to new events and uses the statistics::Repo to upgrade and store metrics.

See the statistics::Event enum to check which events are available.

Structs§

Keeper
The service responsible for keeping tracker metrics (listening to statistics events and handle them).
Metrics
Metrics collected by the tracker.
Repo
A repository for the tracker metrics.
Sender
An statistics::EventSender implementation.

Enums§

Event
An statistics event. It is used to collect tracker metrics.

Traits§

EventSender
A trait to allow sending statistics events