Skip to main content

Module stats

Module stats 

Source
Expand description

Statistics collection and display for dcg.

This module provides functionality to:

  • Parse log files (both text and JSON formats)
  • Aggregate statistics by pack
  • Display statistics for a configurable time period

Structs§

AggregatedStats
Aggregated statistics across all packs.
PackStats
Statistics for a single pack.
ParsedLogEntry
A single log entry parsed from the log file.

Enums§

Decision
Decision type from log entries.

Constants§

DEFAULT_PERIOD_SECS
Default time period for statistics (30 days in seconds).

Functions§

format_stats_json
Format statistics as JSON.
format_stats_pretty
Format statistics for display.
parse_log_file
Parse a log file and return aggregated statistics.