Mrftiindirect-magenta
    Updated 2025-02-05
    WITH block_data AS (
    SELECT
    date_trunc({{period_type}}, block_timestamp) AS period_start,
    block_timestamp,
    COUNT(DISTINCT tx_hash) AS tx_count,
    LEAD(block_timestamp) OVER (ORDER BY block_timestamp) AS next_block_timestamp
    FROM
    berachain.testnet.fact_transactions
    WHERE
    block_timestamp::date >= '{{start_day}}'
    AND date_trunc({{period_type}}, block_timestamp) <= '{{target_day}}'
    GROUP BY
    1, 2
    )

    SELECT
    period_start AS "Date",
    AVG(tx_count / NULLIF(DATEDIFF('second', block_timestamp, next_block_timestamp), 0)) AS "AVG TPS",
    LAG("AVG TPS") OVER (ORDER BY period_start) AS lag_avg_tps,
    ROUND(100 * ("AVG TPS" - lag_avg_tps)/NULLIF(lag_avg_tps, 0), 2) AS "AVG TPS Change %",
    MAX(tx_count / NULLIF(DATEDIFF('second', block_timestamp, next_block_timestamp), 0)) AS "MAX TPS",
    LAG("MAX TPS") OVER (ORDER BY period_start) AS lag_max_tps,
    ROUND(100 * ("MAX TPS" - lag_max_tps)/NULLIF(lag_max_tps, 0), 2) AS "MAX TPS Change %"
    FROM
    block_data
    WHERE
    next_block_timestamp IS NOT NULL
    GROUP BY
    1
    ORDER BY
    1 DESC;
    Last run: about 1 month ago
    Date
    AVG TPS
    LAG_AVG_TPS
    AVG TPS Change %
    MAX TPS
    LAG_MAX_TPS
    MAX TPS Change %
    1
    2025-01-13 00:00:00.00069.29967182993476.141849017024-8.9995253577.94
    2
    2025-01-06 00:00:00.00076.14184901702467.45778002544312.87535727-26.41
    3
    2024-12-30 00:00:00.00067.45778002544358.65731971084157271092-33.42
    4
    2024-12-23 00:00:00.00058.6573197108436.36015561936461.321092428155.14
    5
    2024-12-16 00:00:00.00036.36015561936423.34049942301355.78428548-21.9
    6
    2024-12-09 00:00:00.00023.34049942301320.20176154446815.54548689-20.46
    7
    2024-12-02 00:00:00.00020.20176154446818.7565156059947.7168944455.18
    8
    2024-11-25 00:00:00.00018.75651560599419.677517731061-4.68444993-55.29
    9
    2024-11-18 00:00:00.00019.67751773106125.140975993766-21.739931036-4.15
    10
    2024-11-11 00:00:00.00025.14097599376626.45429977616-4.96103681027.9
    11
    2024-11-04 00:00:00.00026.4542997761624.7710843460476.881072212.19
    12
    2024-10-28 00:00:00.00024.77108434604720.07561553207323.39722875-17.49
    13
    2024-10-21 00:00:00.00020.07561553207350.879441037164-60.5487579310.34
    14
    2024-10-14 00:00:00.00050.87944103716472.20769383506-29.54793833-4.8
    15
    2024-10-07 00:00:00.00072.2076938350673.645662731842-1.958338171.96
    16
    2024-09-30 00:00:00.00073.64566273184275.486982138833-2.448178081.11
    17
    2024-09-23 00:00:00.00075.48698213883333.309722886617126.6280862529.28
    18
    2024-09-16 00:00:00.00033.30972288661731.5288645641425.6562545337.97
    19
    2024-09-09 00:00:00.00031.52886456414227.61876311263514.164531032-56.1
    20
    2024-09-02 00:00:00.00027.61876311263537.221121207089-25.8103265058.77
    33
    3KB
    111s