Delay based logging.
BUG=none Review-Url: https://codereview.webrtc.org/2808833002 Cr-Commit-Position: refs/heads/master@{#17641}
This commit is contained in:
@ -467,6 +467,7 @@ EventLogAnalyzer::EventLogAnalyzer(const ParsedRtcEventLog& log)
|
||||
break;
|
||||
}
|
||||
case ParsedRtcEventLog::DELAY_BASED_BWE_UPDATE: {
|
||||
bwe_delay_updates_.push_back(parsed_log_.GetDelayBasedBweUpdate(i));
|
||||
break;
|
||||
}
|
||||
case ParsedRtcEventLog::AUDIO_NETWORK_ADAPTATION_EVENT: {
|
||||
@ -933,13 +934,22 @@ void EventLogAnalyzer::CreateTotalBitrateGraph(
|
||||
|
||||
// Overlay the send-side bandwidth estimate over the outgoing bitrate.
|
||||
if (desired_direction == kOutgoingPacket) {
|
||||
TimeSeries* time_series =
|
||||
TimeSeries* loss_series =
|
||||
plot->AddTimeSeries("Loss-based estimate", LINE_STEP_GRAPH);
|
||||
for (auto& bwe_update : bwe_loss_updates_) {
|
||||
for (auto& loss_update : bwe_loss_updates_) {
|
||||
float x =
|
||||
static_cast<float>(bwe_update.timestamp - begin_time_) / 1000000;
|
||||
float y = static_cast<float>(bwe_update.new_bitrate) / 1000;
|
||||
time_series->points.emplace_back(x, y);
|
||||
static_cast<float>(loss_update.timestamp - begin_time_) / 1000000;
|
||||
float y = static_cast<float>(loss_update.new_bitrate) / 1000;
|
||||
loss_series->points.emplace_back(x, y);
|
||||
}
|
||||
|
||||
TimeSeries* delay_series =
|
||||
plot->AddTimeSeries("Delay-based estimate", LINE_STEP_GRAPH);
|
||||
for (auto& delay_update : bwe_delay_updates_) {
|
||||
float x =
|
||||
static_cast<float>(delay_update.timestamp - begin_time_) / 1000000;
|
||||
float y = static_cast<float>(delay_update.bitrate_bps) / 1000;
|
||||
delay_series->points.emplace_back(x, y);
|
||||
}
|
||||
|
||||
TimeSeries* created_series =
|
||||
|
||||
@ -173,6 +173,8 @@ class EventLogAnalyzer {
|
||||
|
||||
std::vector<ParsedRtcEventLog::BweProbeResultEvent> bwe_probe_result_events_;
|
||||
|
||||
std::vector<ParsedRtcEventLog::BweDelayBasedUpdate> bwe_delay_updates_;
|
||||
|
||||
// Window and step size used for calculating moving averages, e.g. bitrate.
|
||||
// The generated data points will be |step_| microseconds apart.
|
||||
// Only events occuring at most |window_duration_| microseconds before the
|
||||
|
||||
@ -78,7 +78,7 @@ void PythonPlot::Draw() {
|
||||
} else if (series_list_[i].style == DOT_GRAPH) {
|
||||
printf(
|
||||
"plt.plot(x%zu, y%zu, color=rgb_colors[%zu], label=\'%s\', "
|
||||
"marker='.', ls=' ')\n",
|
||||
"marker='o', ls=' ')\n",
|
||||
i, i, i, series_list_[i].label.c_str());
|
||||
} else {
|
||||
printf("raise Exception(\"Unknown graph type\")\n");
|
||||
|
||||
Reference in New Issue
Block a user