bandwidthIn property

int get bandwidthIn

Returns total bytes received by the P2P node since it started.

Aggregates protocol-level counters (DHT, etc.) with the Bitswap ledger, which accounts for the dominant block-transfer traffic. Returns 0 if metrics collection is disabled or the node is offline.

Implementation

int get bandwidthIn {
  final collector = metricsCollector;
  final bitswapReceived = bitswap?.bandwidthReceived ?? 0;
  return (collector?.totalBytesReceived ?? 0) + bitswapReceived;
}