Home/Docs/Guides/Stats

Program activity metrics and what they measure.

Stats

Overview

bash
bake stats <programId>

Shows program activity metrics derived from on-chain data.

What it measures

MetricSourceDescription
InvocationsRPC getSignaturesForAddressTotal transaction count
Error rateRPC getTransactionPercentage of failed transactions
Unique signersRPC getTransactionDistinct wallet addresses
CU consumedRPC getTransactionCompute unit usage
Network contextCookieScan RESTPrice, market data

What it does NOT measure

Warning: CookieScan has NO program-invocation-analytics endpoint. Program stats are computed from standard Cookie Chain RPC calls, with CookieScan's REST API only supplying supplementary network/price context.

  • โŒ Invocation counts by instruction type
  • โŒ Error rates by error code
  • โŒ CU breakdown by instruction
  • โŒ Historical trends

These would require chain-wide indexing infrastructure beyond a CLI's reasonable scope.

Usage

bash
# Current project's program
bake stats

# Specific program
bake stats 56Vj61zFW4hHV6wdjnisrHtVwWDqyjixjpBgnoRJvzxL

Output

Program: 56Vj61zFW4hHV6wdjnisrHtVwWDqyjixjpBgnoRJvzxL

  Invocations: 1,247
  Error rate: 2.1%
  Unique signers: 89
  Avg CU: 45,230

  Network: Cookie Chain
  COOK price: $0.0042

Flags

FlagDescription
--ciPlain output
--jsonStructured JSON
Sourced from local MDX in docs/content/docs