stellar / dashboard

https://dashboard.stellar.org
217 stars 139 forks source link

Get operations stats from ledger history #297

Closed Selhar closed 2 years ago

Selhar commented 2 years ago

Adds new endpoint /api/ledgers/op_stats, it returns operations sorted by month. Starts on 2015, ends on current month. Sample output: image

The query is pretty fast actually, takes about 4 seconds. The worry i had for long executing queries was because i thought we wanted a similar system to what we have for other ledgers.

I think when we implement the redis CRON jobs, we can clear out this key as well whenever we want more updated results. The key is ledger-operation-stats. Let me know if you want any improvements in this PR @acharb

stellar-jenkins commented 2 years ago

Preview is available here:
https://dashboard-pr297.prototypes.kube001.services.stellar-ops.com/

acharb commented 2 years ago

this lgtm, I'm confirming the BQ query is correct with our team first before approving

stellar-jenkins commented 2 years ago

Preview is available here:
https://dashboard-pr297.prototypes.kube001.services.stellar-ops.com/