Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Unified Diff: webrtc/tools/event_log_visualizer/plot_protobuf.cc

Issue 2310403002: Renamed and restructured the protobuf definitions for the rtc_event_log graphs. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/tools/event_log_visualizer/plot_protobuf.h ('k') | webrtc/tools/tools.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/tools/event_log_visualizer/plot_protobuf.cc
diff --git a/webrtc/tools/event_log_visualizer/plot_protobuf.cc b/webrtc/tools/event_log_visualizer/plot_protobuf.cc
index 7f032c11b81c0c5b5350c773a1b93e50499cae5c..e6e1adc703313c50b8e3dd4380fb3aaee3fc610c 100644
--- a/webrtc/tools/event_log_visualizer/plot_protobuf.cc
+++ b/webrtc/tools/event_log_visualizer/plot_protobuf.cc
@@ -21,36 +21,37 @@ ProtobufPlot::~ProtobufPlot() {}
void ProtobufPlot::Draw() {}
-void ProtobufPlot::ExportProtobuf(protobuf_plot::Plot* plot) {
+void ProtobufPlot::ExportProtobuf(webrtc::analytics::Chart* chart) {
for (size_t i = 0; i < series_list_.size(); i++) {
- protobuf_plot::DataSet* data_set = plot->add_data_sets();
+ webrtc::analytics::DataSet* data_set = chart->add_data_sets();
for (const auto& point : series_list_[i].points) {
- data_set->add_xvalues(point.x);
+ data_set->add_x_values(point.x);
}
for (const auto& point : series_list_[i].points) {
- data_set->add_yvalues(point.y);
+ data_set->add_y_values(point.y);
}
if (series_list_[i].style == BAR_GRAPH) {
- data_set->set_style(protobuf_plot::BAR_GRAPH);
+ data_set->set_style(webrtc::analytics::ChartStyle::BAR_CHART);
} else if (series_list_[i].style == LINE_GRAPH) {
- data_set->set_style(protobuf_plot::LINE_GRAPH);
+ data_set->set_style(webrtc::analytics::ChartStyle::LINE_CHART);
} else if (series_list_[i].style == LINE_DOT_GRAPH) {
- data_set->set_style(protobuf_plot::LINE_DOT_GRAPH);
+ data_set->set_style(webrtc::analytics::ChartStyle::LINE_CHART);
+ data_set->set_highlight_points(true);
} else {
- data_set->set_style(protobuf_plot::UNDEFINED);
+ data_set->set_style(webrtc::analytics::ChartStyle::UNDEFINED);
}
data_set->set_label(series_list_[i].label);
}
- plot->set_xaxis_min(xaxis_min_);
- plot->set_xaxis_max(xaxis_max_);
- plot->set_yaxis_min(yaxis_min_);
- plot->set_yaxis_max(yaxis_max_);
- plot->set_xaxis_label(xaxis_label_);
- plot->set_yaxis_label(yaxis_label_);
- plot->set_title(title_);
+ chart->set_xaxis_min(xaxis_min_);
+ chart->set_xaxis_max(xaxis_max_);
+ chart->set_yaxis_min(yaxis_min_);
+ chart->set_yaxis_max(yaxis_max_);
+ chart->set_xaxis_label(xaxis_label_);
+ chart->set_yaxis_label(yaxis_label_);
+ chart->set_title(title_);
}
ProtobufPlotCollection::ProtobufPlotCollection() {}
@@ -60,12 +61,13 @@ ProtobufPlotCollection::~ProtobufPlotCollection() {}
void ProtobufPlotCollection::Draw() {}
void ProtobufPlotCollection::ExportProtobuf(
- protobuf_plot::PlotCollection* collection) {
+ webrtc::analytics::ChartCollection* collection) {
for (const auto& plot : plots_) {
// TODO(terelius): Ensure that there is no way to insert plots other than
// ProtobufPlots in a ProtobufPlotCollection. Needed to safely static_cast
// here.
- protobuf_plot::Plot* protobuf_representation = collection->add_plots();
+ webrtc::analytics::Chart* protobuf_representation
+ = collection->add_charts();
static_cast<ProtobufPlot*>(plot.get())
->ExportProtobuf(protobuf_representation);
}
« no previous file with comments | « webrtc/tools/event_log_visualizer/plot_protobuf.h ('k') | webrtc/tools/tools.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698