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

Unified Diff: webrtc/rtc_tools/event_log_visualizer/plot_base.h

Issue 2826313004: Added -show_detector_state which show the detector state in the total bitrate graph. (Closed)
Patch Set: Intervals now show up in the legend. Created 3 years, 5 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/rtc_tools/event_log_visualizer/main.cc ('k') | webrtc/rtc_tools/event_log_visualizer/plot_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/rtc_tools/event_log_visualizer/plot_base.h
diff --git a/webrtc/rtc_tools/event_log_visualizer/plot_base.h b/webrtc/rtc_tools/event_log_visualizer/plot_base.h
index bdcea2e5c3e27be7ff224e975dfd39e63d600caf..347fca4cf8512ab3a23b2471d1ec864e7dc20dee 100644
--- a/webrtc/rtc_tools/event_log_visualizer/plot_base.h
+++ b/webrtc/rtc_tools/event_log_visualizer/plot_base.h
@@ -53,6 +53,29 @@ struct TimeSeries {
std::vector<TimeSeriesPoint> points;
};
+struct Interval {
+ Interval() = default;
+ Interval(double begin, double end) : begin(begin), end(end) {}
+
+ double begin;
+ double end;
+};
+
+struct IntervalSeries {
+ enum Orientation { kHorizontal, kVertical };
+
+ IntervalSeries() = default;
+ IntervalSeries(const std::string& label,
+ const std::string& color,
+ IntervalSeries::Orientation orientation)
+ : label(label), color(color), orientation(orientation) {}
+
+ std::string label;
+ std::string color;
+ Orientation orientation;
+ std::vector<Interval> intervals;
+};
+
// A container that represents a general graph, with axes, title and one or
// more data series. A subclass should define the output format by overriding
// the Draw() method.
@@ -109,6 +132,9 @@ class Plot {
// Add a new TimeSeries to the plot.
void AppendTimeSeries(TimeSeries&& time_series);
+ // Add a new IntervalSeries to the plot.
+ void AppendIntervalSeries(IntervalSeries&& interval_series);
+
// Add a new TimeSeries to the plot if the series contains contains data.
// Otherwise, the call has no effect and the timeseries is destroyed.
void AppendTimeSeriesIfNotEmpty(TimeSeries&& time_series);
@@ -122,6 +148,7 @@ class Plot {
std::string yaxis_label_;
std::string title_;
std::vector<TimeSeries> series_list_;
+ std::vector<IntervalSeries> interval_list_;
};
class PlotCollection {
« no previous file with comments | « webrtc/rtc_tools/event_log_visualizer/main.cc ('k') | webrtc/rtc_tools/event_log_visualizer/plot_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698