Skip to content

Commit

Permalink
Add service execution time example
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryp Toon committed Dec 17, 2024
1 parent 7a7ba54 commit b6110cf
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions examples/service_execution_times.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
#
# BitcoinLib - Python Cryptocurrency Library
#
# EXAMPLES - Service - Measure execution time per service provider for simple blockcount query
#
# © 2021 - 2024 December - 1200 Web Development <http://1200wd.com/>
#

from bitcoinlib.services.services import Service


for provider in Service().providers:
try:
srv = Service(provider_name=provider, cache_uri='')
except:
pass
else:
print(provider, srv.blockcount(), srv.execution_time)

0 comments on commit b6110cf

Please sign in to comment.