Move PerfWarningTimer to SessionConnection::do_flush.
This commit is contained in:
parent
275ee280d2
commit
74879d9726
@ -25,7 +25,6 @@
|
|||||||
#include "td/utils/SliceBuilder.h"
|
#include "td/utils/SliceBuilder.h"
|
||||||
#include "td/utils/Status.h"
|
#include "td/utils/Status.h"
|
||||||
#include "td/utils/StorerBase.h"
|
#include "td/utils/StorerBase.h"
|
||||||
#include "td/utils/Timer.h"
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
@ -248,7 +247,6 @@ class RawConnectionDefault final : public RawConnection {
|
|||||||
if (has_error_) {
|
if (has_error_) {
|
||||||
return Status::Error("Connection has already failed");
|
return Status::Error("Connection has already failed");
|
||||||
}
|
}
|
||||||
PerfWarningTimer timer("RawConnection::do_flush", 0.01);
|
|
||||||
sync_with_poll(socket_fd_);
|
sync_with_poll(socket_fd_);
|
||||||
|
|
||||||
// read/write
|
// read/write
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "td/utils/ScopeGuard.h"
|
#include "td/utils/ScopeGuard.h"
|
||||||
#include "td/utils/SliceBuilder.h"
|
#include "td/utils/SliceBuilder.h"
|
||||||
#include "td/utils/Time.h"
|
#include "td/utils/Time.h"
|
||||||
|
#include "td/utils/Timer.h"
|
||||||
#include "td/utils/tl_parsers.h"
|
#include "td/utils/tl_parsers.h"
|
||||||
#include "td/utils/TlDowncastHelper.h"
|
#include "td/utils/TlDowncastHelper.h"
|
||||||
|
|
||||||
@ -1027,6 +1028,7 @@ Status SessionConnection::do_flush() {
|
|||||||
<< connected_flag_ << ' ' << is_main_ << ' ' << need_destroy_auth_key_ << ' '
|
<< connected_flag_ << ' ' << is_main_ << ' ' << need_destroy_auth_key_ << ' '
|
||||||
<< sent_destroy_auth_key_ << ' ' << callback_ << ' ' << (Time::now() - created_at_) << ' '
|
<< sent_destroy_auth_key_ << ' ' << callback_ << ' ' << (Time::now() - created_at_) << ' '
|
||||||
<< (Time::now() - last_read_at_);
|
<< (Time::now() - last_read_at_);
|
||||||
|
PerfWarningTimer timer("SessionConnection::do_flush", 0.01);
|
||||||
CHECK(state_ != Closed);
|
CHECK(state_ != Closed);
|
||||||
if (state_ == Init) {
|
if (state_ == Init) {
|
||||||
TRY_STATUS(init());
|
TRY_STATUS(init());
|
||||||
|
Loading…
Reference in New Issue
Block a user