You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We compute the tx_volume stats in a materialized view in a wasteful manner: Every time we refresh the stats, the numbers are recomputed for every timestamp in the past, even the ones for which we already have the stats computed. It was easy to code but has downsides:
costs CPU on the DB cluster (no big deal)
the 5-min-granularity stats are not refreshed every 5 minutes
The logic from dailyActiveAccountsWorker can likely be reused to compute the stats incrementally.
Additional new requirement from frontend: Provide 24h tx volume at every 5-min timestamp (=windowed sum), much like the /{layer}/stats/active_accounts endpoint. Currently, we provide only the total tx volume for each calendar day.
The text was updated successfully, but these errors were encountered:
We compute the
tx_volume
stats in a materialized view in a wasteful manner: Every time we refresh the stats, the numbers are recomputed for every timestamp in the past, even the ones for which we already have the stats computed. It was easy to code but has downsides:The logic from
dailyActiveAccountsWorker
can likely be reused to compute the stats incrementally.Additional new requirement from frontend: Provide 24h tx volume at every 5-min timestamp (=windowed sum), much like the
/{layer}/stats/active_accounts
endpoint. Currently, we provide only the total tx volume for each calendar day.The text was updated successfully, but these errors were encountered: