Skip to content

Commit

Permalink
block history to report total number of transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy committed Aug 22, 2024
1 parent 1f25c59 commit c95cb91
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/heapwatch/block_history_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# Graph over time of TPS or 10-round-moving-average-TPS

import base64
import json
import os
import statistics
import sys
Expand Down Expand Up @@ -106,12 +107,25 @@ def process(path, args):
prevtc = tc
prevts = ts
prevtime = _time
print('{} blocks, block txns [{}-{}], block seconds [{}-{}], tps [{}-{}]'.format(
print('{} blocks, block txns [{}-{}], block seconds [{}-{}], tps [{}-{}], total txns {}'.format(
count,
mintxn,maxtxn,
mindt,maxdt,
mintps,maxtps,
tc,
))
if tc > 0:
with open(path + '.stats', 'w') as fout:
fout.write(json.dumps({
'blocks': count,
'tc': tc,
'mintxn': mintxn,
'maxtxn': maxtxn,
'mindt': mindt,
'maxdt': maxdt,
'mintps': mintps,
'maxtps': maxtps,
}))

start = 0
end = len(txnv)-1
Expand Down

0 comments on commit c95cb91

Please sign in to comment.