stellar / dashboard

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

use total sums to find the averages in formatOutput #288

Closed acharb closed 2 years ago

stellar-jenkins commented 2 years ago

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

acharb commented 2 years ago

@Selhar this is missing splitting the transaction count into successful and failed ones, but the idea should for the averages is the same. Feel free to close and use your PR or merge and build off this one

Selhar commented 2 years ago

Yeah this was the implementation i had here, but it creates the problem where we're hiding averages. So if we have 200 transactions, we're assuming all of them took exactly the same time which is fine for 1h interval but the higher the intervals, the more wildly different the values will be from reality.

Let's say the time between the first interaction and the last is 60 minutes and we have 100 transactions, our computed average will always be 35 seconds, as if every transaction took 35 seconds. But if we had one interaction that took half an hour and all of the rest happened in the remaining 1h, our average is a lot lower than that.

Forget about that, i made the calculations again manually and it should be the same. Not sure why the results are different on this method and the previous one though.

stellar-jenkins commented 2 years ago

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

stellar-jenkins commented 2 years ago

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

Selhar commented 2 years ago

image

Final output sample. Feel free to merge after reviewing, this has already been rebased with #287.

stellar-jenkins commented 2 years ago

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

acharb commented 2 years ago

awesome thanks for fixing it 💯