mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
media: sctp: Convert frequent logs to RTC_DLOG
In benchmarks, each log statement represent 2% of the CPU usage. RTC_LOG is not very expensive, but not free either, and it's called for every received and sent packet. Bug: webrtc:12943 Change-Id: Id65baafb5e494091a3a7604687718fdd4f477d86 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231223 Reviewed-by: Florent Castelli <orphis@webrtc.org> Commit-Queue: Victor Boivie <boivie@webrtc.org> Cr-Commit-Position: refs/heads/main@{#34929}
This commit is contained in:
parent
5498676edd
commit
767235dda3
1 changed files with 4 additions and 4 deletions
|
@ -328,8 +328,8 @@ SendPacketStatus DcSctpTransport::SendPacketWithStatus(
|
|||
if (!transport_ || !transport_->writable())
|
||||
return SendPacketStatus::kError;
|
||||
|
||||
RTC_LOG(LS_VERBOSE) << debug_name_ << "->SendPacket(length=" << data.size()
|
||||
<< ")";
|
||||
RTC_DLOG(LS_VERBOSE) << debug_name_ << "->SendPacket(length=" << data.size()
|
||||
<< ")";
|
||||
|
||||
auto result =
|
||||
transport_->SendPacket(reinterpret_cast<const char*>(data.data()),
|
||||
|
@ -510,8 +510,8 @@ void DcSctpTransport::OnTransportReadPacket(
|
|||
return;
|
||||
}
|
||||
|
||||
RTC_LOG(LS_VERBOSE) << debug_name_
|
||||
<< "->OnTransportReadPacket(), length=" << length;
|
||||
RTC_DLOG(LS_VERBOSE) << debug_name_
|
||||
<< "->OnTransportReadPacket(), length=" << length;
|
||||
if (socket_) {
|
||||
socket_->ReceivePacket(rtc::ArrayView<const uint8_t>(
|
||||
reinterpret_cast<const uint8_t*>(data), length));
|
||||
|
|
Loading…
Reference in a new issue