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)
|
b = env.open_db(bucket.encode(), create=False)
|
||||||
with env.begin(write=False) as txn:
|
with env.begin(write=False) as txn:
|
||||||
stat = txn.stat(b)
|
stat = txn.stat(b)
|
||||||
data["name"].append(bucket)
|
size = stat['psize'] * (stat['branch_pages'] + stat['leaf_pages'] + stat['overflow_pages'])
|
||||||
data["size"].append(stat['psize'] * (stat['branch_pages'] + stat['leaf_pages'] + stat['overflow_pages']))
|
print("%s: %dMb" % (bucket, size/1024/1024))
|
||||||
|
# data["name"].append(bucket)
|
||||||
df = pd.DataFrame.from_dict(data)
|
# data["size"].append(stat['psize'] * (stat['branch_pages'] + stat['leaf_pages'] + stat['overflow_pages']))
|
||||||
fig = px.pie(df, values='size', names='name', title='Buckets size')
|
# df = pd.DataFrame.from_dict(data)
|
||||||
fig.show()
|
# fig = px.pie(df, values='size', names='name', title='Buckets size')
|
||||||
|
# fig.show()
|
||||||
elif cmd == "gas_limits":
|
elif cmd == "gas_limits":
|
||||||
StartedWhenBlockNumber = chain.lastBlockNumber(env)
|
StartedWhenBlockNumber = chain.lastBlockNumber(env)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user