Skip to content

Commit

Permalink
Typo Error FIX (#15)
Browse files Browse the repository at this point in the history
Was some typo error while . . I have fixed the typos time.perf.counter() and time.perf.counter() to time.perf_counter():
  • Loading branch information
BottoStm authored Aug 4, 2024
1 parent 7e90248 commit 81b7e0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions docker/history/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from apscheduler.schedulers.background import BackgroundScheduler
import itertools
import os # Import os module to read environment variables
import time # Importing time module

# Configure logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
Expand Down
16 changes: 8 additions & 8 deletions docker/sync/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,23 +564,23 @@ def fetch_block(block_num):
pprint(log_tag + "[STEEM] - Starting Block #" + str(last_block))
flush_start_time1 = time.perf_counter()
sys.stdout.flush()
flush_time1 = time.perf.counter() - flush_start_time1
flush_time1 = time.perf_counter() - flush_start_time1

get_block_start_time = time.perf.counter()
get_block_time = time.perf.counter() - get_block_start_time
get_block_start_time = time.perf_counter()
get_block_time = time.perf_counter() - get_block_start_time

process_block_start_time = time.perf.counter()
process_block_start_time = time.perf_counter()
process_block(block, last_block)
process_block_time = time.perf.counter() - process_block_start_time
process_block_time = time.perf_counter() - process_block_start_time

db.status.update_one({'_id': 'height'}, {"$set": {'value': last_block}}, upsert=True)
pprint(log_tag + "[STEEM] - Processed up to Block #" + str(last_block))

flush_start_time2 = time.perf.counter()
flush_start_time2 = time.perf_counter()
sys.stdout.flush()
flush_time2 = time.perf.counter() - flush_start_time2
flush_time2 = time.perf_counter() - flush_start_time2

total_time = time.perf.counter() - total_start_time
total_time = time.perf_counter() - total_start_time
print(log_tag + '[TEST Time] Total time: [%f], \
get_block time: [%f, %s%%], \
process_block time: [%f, %s%%], \
Expand Down

0 comments on commit 81b7e0d

Please sign in to comment.