Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

This module is a framework for reading statistics from a blockchain and sending it to a server

License

Notifications You must be signed in to change notification settings

BPChain/blockchain-statistics-readout

Repository files navigation

Travis: Build Status Coveralls: Coverage Status CodeClimate: Maintainability

Statistics Reader

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.

Usage

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.

Install

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.

Architecture

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

Tests for the reader are in the tests folder and test the Reader. You can run them with python3 -m pytest

About

This module is a framework for reading statistics from a blockchain and sending it to a server

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages