ArweaveTeam / arweave

The Arweave server and App Developer Toolkit.
https://www.arweave.org
GNU General Public License v2.0
916 stars 201 forks source link

[Feature] include total weave size of all partitions configured #417

Open heavyarms2112 opened 1 year ago

heavyarms2112 commented 1 year ago

curl localhost:1984/metrics | grep v2_index_data_size_by_packing | grep spora_2_6

Currently the above would result in chunk size total for each partition. Can we sum it up and have a counter for same available in metrics?

ldmberman commented 1 year ago

Hi, you could set up Grafana and create an aggregate query or use a bash script - | grep v2_index_data_size_by_packing | grep spora_2_6 | awk '{print $NF}' | awk '{ sum += $1; } END { print sum; }' "$@".

heavyarms2112 commented 1 year ago

I already do it in bash like below. Is that hard to implement in metrics? curl -s localhost:1988/metrics | grep v2_index_data_size_by_packing | grep spora_2_6 | awk -F' ' '{sum+=$2;} END{print sum/1000000000;}'