terra-money / alliance

🤝 Alliance chain with x/alliance module
Other
49 stars 31 forks source link

fix: change the start time used to calculate end blocker time metric #355

Open madrezaz opened 4 months ago

madrezaz commented 4 months ago

We found out that the metric reported for the alliance module's end-blocker time is weirdly high:

{
  "Name": "end_blocker",
  "Count": 2,
  "Rate": 1244.006640625,
  "Sum": 12440.06640625,
  "Min": 6176.10205078125,
  "Max": 6263.96435546875,
  "Mean": 6220.033203125,
  "Stddev": 62.12803145520983,
  "Labels": {
    "module": "alliance"
  }
}

And realized that instead of using time.Now() as the start time for calculating the metric, block time is used, which causes this problem.