ipfs / ipfs-webui

A frontend for an IPFS Kubo and IPFS Desktop
https://webui.ipfs.io
MIT License
1.55k stars 483 forks source link

Add indicators for bitswap status: which peers #1037

Closed Stebalien closed 4 years ago

Stebalien commented 5 years ago

It would be nice to be able to see which peers we are exchanging data with. We can get this information with ipfs bitswap stat and ipfs bitswap ledger.

Context: https://github.com/ipfs/go-ipfs/issues/3330.

jessicaschilling commented 4 years ago

@Stebalien and @lidel: This is an old issue, but wanted to check in - maybe a good bounty candidate?

OTMH, I'd imagine this as being represented in the UI in the Peers screen table (sortable column), but would welcome any other approaches you'd have in mind. Thanks!

Stebalien commented 4 years ago

My main concern with making this a bounty is that it needs some design (ux) work first. But other than that, yes.

Showing this on the peers table sounds reasonable. I'd love to see rates on the map as well, but that would require tracking this ipfs bitswap ledger over time.

jessicaschilling commented 4 years ago

My main concern with making this a bounty is that it needs some design (ux) work first

@Stebalien too simplistic? image

lidel commented 4 years ago

@jessicaschilling fysa we are able to tell how much data was sent / received per peer historically, and "at the moment".

Some examples below, for your reference.

Stat source examples

Realtime stats per peer

(we use ipfs stats bw for bandwidth graph on Status page, but we don't filter per peer, just get global stats)

$ ipfs stats bw -p QmPeer1
Bandwidth
TotalIn: 207 kB
TotalOut: 940 kB
RateIn: 0 B/s
RateOut: 0 B/s

Historical stats

ipfs bitswap ledger keeps track of past transfers, most numbers will overlap with totals from ipfs stats bw.

Peer that did not exchange data with us yet (no icon):

$ ipfs bitswap ledger QmPeer2
Ledger for QmPeer2
Debt ratio: 0.000000
Exchanges:  0
Bytes sent: 0
Bytes received: 0

Peer that fetched stuff from us (sent vs received, or just look at ratio)

$ ipfs bitswap ledger QmPeer3
Ledger for QmPeer3
Debt ratio: 561.000000
Exchanges:  1
Bytes sent: 561
Bytes received: 0
jessicaschilling commented 4 years ago

Closing this one in favor of general Peers page table enhancement in https://github.com/ipfs-shipyard/ipfs-webui/issues/1602.