Travis: Coveralls: CodeClimate:
This is a framework for reading statistics such as hashrate, average block-time, etc from a Blockchain. The framework is installed as a pip package.
To use it one has to supply an Adapter object, a chain name and the process name of the blockchain
process to the Sender class. Sender(self, server_address: str, process_name: str, chain_name: str, adapter: BlockchainAdapter, period=10)
Is the object needed to read and send data. For
more info read the documentation in sender
. This framework is
used by private-multichain,
private-ethereum and
private-xain.
pip3 install git+git://github.com/BPChain/blockchain_statistics_readout.git
You can append a @1.1 to download that specific tag from this repo.
Sender
sends the data to the server. For this it uses a
Reader
object which reads the data with the help of
a BlockchainAdapter
which has to be implemented by
each blockchain. The Reader
also does some basic averaging of the data it collects.
Tests for the reader are in the tests
folder and test the
Reader
. You can run them with python3 -m pytest