Revert of Visualization tool for WebrtcEventLogs (patchset #9 id:160001 of https://codereview.webrtc.org/1995523002/ )
Reason for revert: Reverting while investigating a downstream build failure. Original issue's description: > Initial version of the local visualization tool for WebrtcEventLogs. > > Plot graphs to python code. Generate packet, playout, sequence number and total bitrate graphs. > > Add bitrate and latency plots. Generate multiple figures, and control which ones are used through command line flags. > > Committed: https://crrev.com/a478786ef1513790194792010f766324a469db4d > Cr-Commit-Position: refs/heads/master@{#13443} TBR=stefan@webrtc.org,aleloi@webrtc.org,phoglund@webrtc.org,henrika@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.webrtc.org/2147453002 Cr-Commit-Position: refs/heads/master@{#13445}
This commit is contained in:
@ -1,78 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
#ifndef WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_PLOT_BASE_H_
|
||||
#define WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_PLOT_BASE_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace webrtc {
|
||||
namespace plotting {
|
||||
|
||||
enum PlotStyle { LINE_GRAPH, BAR_GRAPH };
|
||||
|
||||
struct TimeSeriesPoint {
|
||||
TimeSeriesPoint(float x, float y) : x(x), y(y) {}
|
||||
float x;
|
||||
float y;
|
||||
};
|
||||
|
||||
struct TimeSeries {
|
||||
TimeSeries() = default;
|
||||
TimeSeries(TimeSeries&& other)
|
||||
: label(std::move(other.label)),
|
||||
style(other.style),
|
||||
points(std::move(other.points)) {}
|
||||
TimeSeries& operator=(TimeSeries&& other) {
|
||||
label = std::move(other.label);
|
||||
style = other.style;
|
||||
points = std::move(other.points);
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::string label;
|
||||
PlotStyle style;
|
||||
std::vector<TimeSeriesPoint> points;
|
||||
};
|
||||
|
||||
// This is basically a struct that represents of a general graph, with axes,
|
||||
// title and one or more data series. We make it a class only to document that
|
||||
// it also specifies an interface for the draw()ing objects.
|
||||
class Plot {
|
||||
public:
|
||||
virtual ~Plot() {}
|
||||
virtual void draw() = 0;
|
||||
|
||||
float xaxis_min;
|
||||
float xaxis_max;
|
||||
std::string xaxis_label;
|
||||
float yaxis_min;
|
||||
float yaxis_max;
|
||||
std::string yaxis_label;
|
||||
std::vector<TimeSeries> series;
|
||||
std::string title;
|
||||
};
|
||||
|
||||
class PlotCollection {
|
||||
public:
|
||||
virtual ~PlotCollection() {}
|
||||
virtual void draw() = 0;
|
||||
virtual Plot* append_new_plot() = 0;
|
||||
|
||||
protected:
|
||||
std::vector<std::unique_ptr<Plot> > plots;
|
||||
};
|
||||
|
||||
} // namespace plotting
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_TOOLS_EVENT_LOG_VISUALIZER_PLOT_BASE_H_
|
Reference in New Issue
Block a user