Skip to content
BLOBPEDIAby Unity Nodes
Documentation/rpc/JSON-RPC methodView on rpc
rpc/JSON-RPC method

p2p.BandwidthForProtocol

**BandwidthForProtocol returns a Stats struct with bandwidth metrics associated with the given protocol.ID. **

Auth level: admin

Params:

[{"name":"proto","description":"protocol.ID","summary":"","schema":{"examples":["/celestia/mocha/ipfs/bitswap"],"type":["string"]},"required":true,"deprecated":false}]

Result:

{"name":"metrics.Stats","description":"metrics.Stats","summary":"","schema":{"examples":[{"TotalIn":42,"TotalOut":42,"RateIn":42,"RateOut":42}],"additionalProperties":false,"properties":{"RateIn":{"type":"number"},"RateOut":{"type":"number"},"TotalIn":{"type":"integer"},"TotalOut":{"type":"integer"}},"type":["object"]},"required":true,"deprecated":false}