stellar / dashboard

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

SDFD-28: feat calculation method tps #293

Closed lccoronel closed 2 years ago

lccoronel commented 2 years ago

RealTPS uses a simple method of counting the transactions in every block over the time period spanning from one week ago until the present moment, then dividing that total number of transactions by the number of seconds from the beginning of the first block until the end of the last block.

Screen Shot 2022-06-28 at 15 58 21
stellar-jenkins commented 2 years ago

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

stellar-jenkins commented 2 years ago

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

acharb commented 2 years ago

Are there designs for the TPS data? I didn't see any in figma

I had two questions about the designs:

  1. can the timeline be in format <month>/<day>/<year>?
  2. the Current TPS chart currently says "in the last ledger". I think that's wrong, since the tps is not just the last ledger. Instead I think it should say "in the last month" if we're using the last 30 days data or something similar?
stellar-jenkins commented 2 years ago

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

stellar-jenkins commented 2 years ago

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

lccoronel commented 2 years ago

Are there designs for the TPS data? I didn't see any in figma

I had two questions about the designs:

  1. can the timeline be in format <month>/<day>/<year>?
  2. the Current TPS chart currently says "in the last ledger". I think that's wrong, since the tps is not just the last ledger. Instead I think it should say "in the last month" if we're using the last 30 days data or something similar?

There aren’t Figma for the TPS data.

  1. Yes
  2. I will check it
stellar-jenkins commented 2 years ago

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

stellar-jenkins commented 2 years ago

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

stellar-jenkins commented 2 years ago

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

italomlp commented 2 years ago

Are there designs for the TPS data? I didn't see any in figma

I had two questions about the designs:

  1. can the timeline be in format <month>/<day>/<year>?
  2. the Current TPS chart currently says "in the last ledger". I think that's wrong, since the tps is not just the last ledger. Instead I think it should say "in the last month" if we're using the last 30 days data or something similar?

@acharb We were discussing and trying to handle the differences between the values for the TPS graph and Current TPS. For the graph, we think we fixed it by calculating the closed times as you said before, using the start and end values from the ledger endpoint data.

For the Current TPS, we were taking a look into the source code of RealTPS website, and we found that they calculate the TPS by using the operation_count value instead of doing the sum failed_transaction_count + successful_transaction_count (see function get_block from line 46 through line 70). Also, accordingly to its code, it seems that they use only the last ledger to calculate the TPS to show on the website. The close time is calculated by getting the last ledger, and the one previous to it, similar to what we do here.

Our questions are:

  1. Should we use operation_count to calculate the TPS as they do? Or keep the transactions sum?
  2. Should we keep the "Current TPS" as pointing to the last ledger only? Or make something like an average for the last week or last month?

cc @jcx120 @lccoronel @izzyandrade

acharb commented 2 years ago

@italomlp let me ask about using ops vs transactions

with regards to the ledger used, it looks like to me (i haven't written rust before so I could be wrong), that they're using the timestamp from a week ago. See here: https://github.com/Aimeedeer/realtps/blob/4f3b67211852c6579f69e4ae5ca5e28e28b37c4d/src/realtps_import/src/calculate.rs#L27

they take the last ledger, and then subtract a weeks worth of seconds from it, and use that as the "previous" ledger.

I think that makes sense, we can do the same thing

acharb commented 2 years ago

@italomlp

  1. Should we use operation_count to calculate the TPS as they do? Or keep the transactions sum?

let's use the operation_count like how realTps is doing it

jcx120 commented 2 years ago

Are there designs for the TPS data? I didn't see any in figma I had two questions about the designs:

  1. can the timeline be in format <month>/<day>/<year>?
  2. the Current TPS chart currently says "in the last ledger". I think that's wrong, since the tps is not just the last ledger. Instead I think it should say "in the last month" if we're using the last 30 days data or something similar?

@acharb We were discussing and trying to handle the differences between the values for the TPS graph and Current TPS. For the graph, we think we fixed it by calculating the closed times as you said before, using the start and end values from the ledger endpoint data.

For the Current TPS, we were taking a look into the source code of RealTPS website, and we found that they calculate the TPS by using the operation_count value instead of doing the sum failed_transaction_count + successful_transaction_count (see function get_block from line 46 through line 70). Also, accordingly to its code, it seems that they use only the last ledger to calculate the TPS to show on the website. The close time is calculated by getting the last ledger, and the one previous to it, similar to what we do here.

Our questions are:

  1. Should we use operation_count to calculate the TPS as they do? Or keep the transactions sum?
  2. Should we keep the "Current TPS" as pointing to the last ledger only? Or make something like an average for the last week or last month?

cc @jcx120 @lccoronel @izzyandrade

Agree with acharb - let's use operation_count and keep it consistent with the real_tps calculation. There is no figma for this but I believe UX has reviewed it and looks fine. thanks

stellar-jenkins commented 2 years ago

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

stellar-jenkins commented 2 years ago

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

jcx120 commented 2 years ago

Data looks good!

stellar-jenkins commented 2 years ago

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

stellar-jenkins commented 2 years ago

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