libp2p / observer-toolkit

🐣 [WIP] toolkit for building libp2p introspection widgets + a few useful out-of-the-box widgets
https://libp2p.io
MIT License
2 stars 2 forks source link

Add pooled data hook for histograms etc #40

Closed AlanSl closed 4 years ago

AlanSl commented 4 years ago

Splitting this out into the data side and the UI side to avoid PRs getting too big, this adds a data hook for pooling data in a linear or logarithmic way with a useReducer dispatch function so that components can update the pooling and data, similar to other data hooks.

Tests give examples of usage.

ovhemert commented 4 years ago

LGTM,.. only tests are using this functionality atm.. right?

AlanSl commented 4 years ago

Yes, that's right, implementing histograms based on this is being done first for DHT which depends on work in other branches and then for streams etc.