This class handles the stats for a given account. It is responsible for aggregating the stats from the time series and compacting the time series database when needed.

The stats are stored in two different places:

  • The time series, which is a list of stats for a given time frame
  • The state, which is the current state of the processed account stats

Type Parameters

  • V

    The type of the value of the account stats

Hierarchy

  • AccountTimeSeriesStatsManager

Constructors

Properties

compactionJob: JobRunner
indexerClient: IndexerMsClient
stats: AccountStats<V>
timeSeriesDAL: StatsTimeSeriesStorage

Methods

  • Processes the account stats. It will trigger the processing of time stats based on fetched events and aggregate the account stats.

    Parameters

    • now: number

      The timestamp to which to process past stats

    Returns Promise<void>

Generated using TypeDoc