mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 04:03:49 +00:00
python_bublic_print_cli (#994)
This commit is contained in:
parent
de16812a94
commit
d73b036cff
@ -36,12 +36,13 @@ if cmd == "stats":
|
||||
b = env.open_db(bucket.encode(), create=False)
|
||||
with env.begin(write=False) as txn:
|
||||
stat = txn.stat(b)
|
||||
data["name"].append(bucket)
|
||||
data["size"].append(stat['psize'] * (stat['branch_pages'] + stat['leaf_pages'] + stat['overflow_pages']))
|
||||
|
||||
df = pd.DataFrame.from_dict(data)
|
||||
fig = px.pie(df, values='size', names='name', title='Buckets size')
|
||||
fig.show()
|
||||
size = stat['psize'] * (stat['branch_pages'] + stat['leaf_pages'] + stat['overflow_pages'])
|
||||
print("%s: %dMb" % (bucket, size/1024/1024))
|
||||
# data["name"].append(bucket)
|
||||
# data["size"].append(stat['psize'] * (stat['branch_pages'] + stat['leaf_pages'] + stat['overflow_pages']))
|
||||
# df = pd.DataFrame.from_dict(data)
|
||||
# fig = px.pie(df, values='size', names='name', title='Buckets size')
|
||||
# fig.show()
|
||||
elif cmd == "gas_limits":
|
||||
StartedWhenBlockNumber = chain.lastBlockNumber(env)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user