Batch RTC event log output if using the new wire format.

The new wire format doesn't have much effect on compression unless
the log is encoded in reasonably large batches.

PeerConnection has two functions to start logging; one which takes
an output period (or batch size) in milliseconds and one which uses
a default period instead. This CL changes the default batch size to
5 seconds if the the new format is enabled as a field trial.

Bug: webrtc:8111
Change-Id: I638f6114325251b6a9acf4f863afe2688a3b0522
Reviewed-on: https://webrtc-review.googlesource.com/c/112130
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25803}
This commit is contained in:
Bjorn Terelius
2018-11-27 15:43:01 +01:00
committed by Commit Bot
parent 352ce5c419
commit 8b5560218a

View File

@ -3311,9 +3311,13 @@ bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file,
const size_t max_size = (max_size_bytes < 0)
? RtcEventLog::kUnlimitedOutput
: rtc::saturated_cast<size_t>(max_size_bytes);
int64_t output_period_ms = webrtc::RtcEventLog::kImmediateOutput;
if (field_trial::IsEnabled("WebRTC-RtcEventLogNewFormat")) {
output_period_ms = 5000;
}
return StartRtcEventLog(
absl::make_unique<RtcEventLogOutputFile>(file, max_size),
webrtc::RtcEventLog::kImmediateOutput);
output_period_ms);
}
bool PeerConnection::StartRtcEventLog(std::unique_ptr<RtcEventLogOutput> output,