-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Metric Dashboard #205
Conversation
METRIC LIST :
|
Full transaction Validation Duration (card/graph/guage) => maybe a graph or histogram |
…ode into metric_dashboard
I got some UI issue when you click on the line in the charts, it disappears. Also I think you should indicate in the UI than the update is every 5 seconds, and the polling is performed for nodes in the network, with aggregation of metrics. |
lib/archethic/metrics/helpers.ex
Outdated
def network_collector() do | ||
data = Enum.filter(retrieve_network_metrics(), fn {key, _val} -> req_metrics(key) end) | ||
data = Enum.into(data, %{}) | ||
Map.put(data, "tps", DB.get_latest_tps()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the TPS should come from the metrics and not only from the DB.
This one is computed for an entire day or self-repair interval, which may not reflects the real load
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Calculating The Transaction per second
archethic_mining_full_transaction_validation_duration_bucket{le="0.01"} 0
archethic_mining_full_transaction_validation_duration_bucket{le="0.025"} 0
archethic_mining_full_transaction_validation_duration_bucket{le="0.05"} 470
archethic_mining_full_transaction_validation_duration_bucket{le="0.1"} 1219
archethic_mining_full_transaction_validation_duration_bucket{le="0.5"} 1471
archethic_mining_full_transaction_validation_duration_bucket{le="0.8"} 1510
archethic_mining_full_transaction_validation_duration_bucket{le="1"} 1511
archethic_mining_full_transaction_validation_duration_bucket{le="1.2"} 1512
archethic_mining_full_transaction_validation_duration_bucket{le="1.5"} 1512
archethic_mining_full_transaction_validation_duration_bucket{le="2"} 1512
archethic_mining_full_transaction_validation_duration_bucket{le="2.5"} 1512
archethic_mining_full_transaction_validation_duration_bucket{le="3"} 1512
archethic_mining_full_transaction_validation_duration_bucket{le="5"} 1512
archethic_mining_full_transaction_validation_duration_bucket{le="10"} 1512
archethic_mining_full_transaction_validation_duration_bucket{le="+Inf"} 1512
archethic_mining_full_transaction_validation_duration_sum 162.63586202400006
archethic_mining_full_transaction_validation_duration_count 1512
So to calculate Transaction per second :
archethic_mining_full_transaction_validation_duration_sum 162.63586202400006
archethic_mining_full_transaction_validation_duration_count 1512
total no of events in less than 10 ms is 1512
So total number of events =1512
and total time 162 ms
.162 seconds --> 1512 txns
in 1s --> 1512/ .162
==> 9333 txn/s
is this maths correct ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi Sir , please mention how to calculate Transaction Per second ? from /metrics endpoint . .???
@samuel-uniris
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1512 is the number of transaction validation which take less than 10s, from the last polling interval (i.e 5 seconds)
162 is total of the observed values (sum of the milliseconds)
So the TPS would be: 1512/162: 9.33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @samuel-uniris Sir,
I have to add all the txn per second of all the nodes. (and not do 1 by average total validation time of network.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can compute the TPS for the all the nodes and then do the average
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Sir,
Averaging TPS shows average TPS across nodes . It shows
Average number of transaction per seconds for a node that is doing in the network , while in network all the combined nodes all are validating/processing TXN simultaneously per second is rather a huge number ?
Perhaps w.r.t ARCH consensus doing AVG of TPS is or , rather a SUM is meaningful ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think SUM will be more meaningful, as it will end up to be a bigger number. Because for now, all the nodes will be involved in the validation, so summing the TPS would create an inconsistent state I think.
For example:
Node1: 5 TPS
Node2: 5 TPS
Node3: 5 TPS
With SUM we will say the network can ingest 15 TPS, while in reality the network only manage 5 transactions but for different nodes, so the AVG may show more accurate values, I think.
Even if we are using sharding, several nodes are involved for a given transaction and not one transaction by node.
Hi Sir ,Pardon I didn't get you the second part. |
We can put a headline to explain what is this screen |
-implementation of requested changes