| 272 | } |
| 273 | |
| 274 | void IOChannel::ByteFromConnectDestSvr(uint32_t byte_size) { |
| 275 | if (byte_size != 0) { |
| 276 | MonitorPluginEntry::GetDefault()->GetMonitorPlugin()->ReceiveByteFromConnectDestSvr(byte_size); |
| 277 | |
| 278 | //mysql client stat |
| 279 | if (connect_port_ == config_->GetMysqlPort()) { |
| 280 | MonitorPluginEntry::GetDefault()->GetMonitorPlugin()->ReceiveByteFromMysql(byte_size); |
| 281 | } |
| 282 | |
| 283 | if (last_read_fd_ != sqlsvr_fd_) { |
| 284 | MonitorPluginEntry::GetDefault()->GetMonitorPlugin()->DestSvrRespPacket(); |
| 285 | last_read_fd_ = sqlsvr_fd_; |
| 286 | |
| 287 | if (last_received_request_timestamp_) { |
| 288 | uint64_t cost = GetTimestampMS() - last_received_request_timestamp_; |
| 289 | if (connect_port_ == config_->GetMysqlPort()) { |
| 290 | //LOG_DEBUG("recieve mysql resp cost %llu", cost); |
| 291 | MonitorPluginEntry::GetDefault()->GetMonitorPlugin()->MysqlQueryCost(cost); |
| 292 | } |
| 293 | //LOG_DEBUG("request exec cost %llu", cost); |
| 294 | MonitorPluginEntry::GetDefault()->GetMonitorPlugin()->RequestExecuteCost(cost); |
| 295 | } |
| 296 | } |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | void IOChannel::ByteFromMysqlClient(uint32_t byte_size) { |
| 301 | if (byte_size != 0) { |
nothing calls this directly
no test coverage detected