1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Add GetPerfTimerStats (#451)

* Add getperfwarningtimeraverage query for validator-engine-console

* Fix for getperfwarningtimeraverage query

* getperftimerstats

* Add history max size: 1 hour

* PerfWarningTimer: move callback instead of copy

* PerfWarningTimer: fix move constructor bug

* PerfWarningTimer: fix bug: lifetime of the callback was greater than lifetime of the local variable 'manager' captured by reference

* Fix validate-query.cpp: 'manager' used after it was moved

* PerfWarningTimer: remove logs

* getperftimerstats: write to json file

* getperftimerstatsjson

Co-authored-by: legaii <jgates.ardux@gmail.com>
Co-authored-by: Ivan Siomash <106972486+legaii@users.noreply.github.com>
This commit is contained in:
EmelyanenkoK 2022-09-10 12:57:13 +03:00 committed by GitHub
parent 8376c289d7
commit 8329a58994
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 244 additions and 27 deletions

View file

@ -44,7 +44,7 @@ class ValidateBroadcast : public td::actor::Actor {
td::Ref<ProofLink> proof_link_;
BlockHandle handle_;
td::PerfWarningTimer perf_timer_{"validatebroadcast", 0.1};
td::PerfWarningTimer perf_timer_;
bool exact_key_block_handle_;
td::Ref<ProofLink> key_proof_link_;
@ -60,7 +60,10 @@ class ValidateBroadcast : public td::actor::Actor {
, last_known_masterchain_block_handle_(std::move(last_known_masterchain_block_handle))
, manager_(manager)
, timeout_(timeout)
, promise_(std::move(promise)) {
, promise_(std::move(promise))
, perf_timer_("validatebroadcast", 0.1, [manager](double duration) {
send_closure(manager, &ValidatorManager::add_perf_timer_stat, "validatebroadcast", duration);
}) {
}
void start_up() override;