I'm trying to build a blockChain explorer backend through Fabric JAVA SDK. How can I get a time-consuming information of a block?
Asked
Active
Viewed 160 times
-1
-
1Welcome to Stack Overflow. Please read the help pages, take the SO tour, read about how to ask good questions, as well as this question checklist. Lastly please learn how to create a minimal reproducible example to show us, with emphasis on the minimal part. – Phoenix Oct 31 '19 at 10:33
1 Answers
0
If possible, it ought to be through the operations service: https://hyperledger-fabric.readthedocs.io/en/release-1.4/operations_service.html
There is already interesting work done with Prometheus and Grafana:
- https://hyperledger-fabric.readthedocs.io/en/release-1.4/metrics_reference.html#prometheus-metrics
- https://medium.com/@ongkhaiwei/monitoring-hyperledger-fabric-components-using-prometheus-92e8bea1f51b
Other than this, the other information you can get from a block in your client is through registerBlockEvent
, but I think it does not fit your requirements: https://fabric-sdk-node.github.io/EventHub.html#registerBlockEvent

kekomal
- 2,179
- 11
- 12
-
Thanks a lot, I've noticed a metric named 'ledger_block_processing_time', and I've checked it and found that it only offers me the informations like 'how many block's been processed in seconds'. I wondered if I can get the informations that tells me how long dose a specific block consume time? – xuzhe951024 Nov 01 '19 at 01:33