Skip to content

mtahon/graph-sync-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The Graph - Syncronization Monitor

This simple Python tools monitor the syncronization of a subgraph and predicts a target date for syncronization.

It works by polling The Graph every 10s for the indexing status of a subgraph.

Installation

Clone the repository:

git clone [email protected]:mtahon/graph-sync-monitor.git

Change directory:

cd graph-sync-monitor

Create a virtual environment:

python3 -m venv env

Activate the virtual environment:

source env/bin/activate

Install the dependencies

pip install -r requirements.txt

Running the monitoring

Start the monitoring:

$ python sync.py
Last indexed block: 10527783 | Speed: 0.747518 b/s | Target: 2020-09-23 13:37:37.123809
Last indexed block: 10527791 | Speed: 0.747765 b/s | Target: 2020-09-23 13:37:12.830740
Last indexed block: 10527797 | Speed: 0.746723 b/s | Target: 2020-09-23 13:38:56.285456
Last indexed block: 10527800 | Speed: 0.744641 b/s | Target: 2020-09-23 13:42:25.478459
Last indexed block: 10527802 | Speed: 0.742115 b/s | Target: 2020-09-23 13:46:40.870269

It displays key metrics:

  • Current Block being indexed
  • Indexing Speed in Block per second, as an average since the monitoring started
  • Target date to reach the requested block at the average indexing speed

After a few minutes the average indexing speed is more stable and the target date should not change much. The script can be stopped at this point with CONTROL+C.

About

Monitors The Graph synchronization status

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages