bandwidthOut property

int get bandwidthOut

Returns total bytes sent 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 bandwidthOut {
  final collector = metricsCollector;
  final bitswapSent = bitswap?.bandwidthSent ?? 0;
  return (collector?.totalBytesSent ?? 0) + bitswapSent;
}