MCPcopy Create free account
hub / github.com/Tencent/phxsql / ByteFromMysqlClient

Method ByteFromMysqlClient

phxsqlproxy/io_channel.cpp:300–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300void IOChannel::ByteFromMysqlClient(uint32_t byte_size) {
301 if (byte_size != 0) {
302 MonitorPluginEntry::GetDefault()->GetMonitorPlugin()->ReceiveByteFromMysqlClient(byte_size);
303
304 //mysql client stat
305 if (connect_port_ == config_->GetMysqlPort()) {
306 MonitorPluginEntry::GetDefault()->GetMonitorPlugin()->MysqlClientConnect(byte_size);
307 }
308
309 if (last_read_fd_ != client_fd_) {
310 MonitorPluginEntry::GetDefault()->GetMonitorPlugin()->ClientReqPacket();
311 last_read_fd_ = client_fd_;
312 last_received_request_timestamp_ = GetTimestampMS();
313 }
314 }
315}
316
317MasterIOChannel::MasterIOChannel(PHXSqlProxyConfig * config,
318 WorkerConfig_t * worker_config,

Callers

nothing calls this directly

Calls 6

GetTimestampMSFunction · 0.85
GetMonitorPluginMethod · 0.80
GetMysqlPortMethod · 0.80
MysqlClientConnectMethod · 0.80
ClientReqPacketMethod · 0.80

Tested by

no test coverage detected