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

Unified Diff: webrtc/modules/remote_bitrate_estimator/test/packet_receiver.h

Issue 1202253003: More Simulation Framework features (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressing trybot failures Created 5 years, 6 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
Index: webrtc/modules/remote_bitrate_estimator/test/packet_receiver.h
diff --git a/webrtc/modules/remote_bitrate_estimator/test/packet_receiver.h b/webrtc/modules/remote_bitrate_estimator/test/packet_receiver.h
index a6838269c688334dba28ef9c06a886880cdf040d..07a0e799997df16c1ce2ba8319ca8ecdf45b7b58 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/packet_receiver.h
+++ b/webrtc/modules/remote_bitrate_estimator/test/packet_receiver.h
@@ -12,6 +12,7 @@
#define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_PACKET_RECEIVER_H_
#include <string>
+#include <vector>
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/scoped_ptr.h"
@@ -38,8 +39,38 @@ class PacketReceiver : public PacketProcessor {
Stats<double> GetDelayStats() const;
+ void PlotThroughputHistogram(const std::string& title,
+ const std::string& bwe_name,
+ int num_flows,
+ int64_t extra_offset_ms);
+ void PlotThroughputHistogram(const std::string& title,
+ const std::string& bwe_name,
+ int num_flows,
+ int64_t extra_offset_ms,
+ const std::string optimum_id);
+ void PlotDelayHistogram(const std::string& title,
+ const std::string& bwe_name,
+ int num_flows);
+ void PlotLossHistogram(const std::string& title,
+ const std::string& bwe_name,
+ int num_flows);
+ void PlotObjectiveHistogram(const std::string& title,
+ const std::string& bwe_name,
+ int num_flows);
+
+ void set_start_computing_metrics_ms(int64_t start_computing_metrics_ms) {
+ start_computing_metrics_ms_ = start_computing_metrics_ms;
+ }
+
+ void set_plot_available_capacity(bool plot) {
+ plot_total_available_capacity_ = plot;
+ }
+
protected:
void PlotDelay(int64_t arrival_time_ms, int64_t send_time_ms);
+ void PlotThroughput(int64_t arrival_time_ms);
+ void PlotTotalAvailableCapacity(int64_t arrival_time_ms);
+ void PlotAvailableCapacityPerFlow(int64_t arrival_time_ms);
void PlotObjectiveFunction(int64_t arrival_time_ms);
void PlotPacketLoss(int64_t arrival_time_ms);
double ObjectiveFunction();
@@ -48,20 +79,37 @@ class PacketReceiver : public PacketProcessor {
std::string delay_log_prefix_;
std::string metric_log_prefix_;
std::string packet_loss_log_prefix_;
+ std::string available_capacity_log_prefix_;
+ std::string throughput_log_prefix_;
int64_t last_delay_plot_ms_;
+ int64_t last_throughput_plot_ms_;
int64_t last_metric_plot_ms_;
int64_t last_packet_loss_plot_ms_;
+ int64_t last_total_capacity_plot_ms_;
+ int64_t last_per_flow_capacity_plot_ms_;
stefan-webrtc 2015/06/25 14:44:05 We should group the string with the last plot time
magalhaesc 2015/07/01 12:48:41 Plot time and bool were moved to MetricRecorder, w
bool plot_delay_;
+ bool plot_throughput_;
bool plot_objective_function_;
bool plot_packet_loss_;
+ bool plot_total_available_capacity_;
+ bool plot_available_capacity_per_flow_;
Stats<double> delay_stats_;
rtc::scoped_ptr<BweReceiver> bwe_receiver_;
- int64_t total_delay_ms_;
- size_t total_throughput_;
- int number_packets_;
-
private:
+ double Renormalize(double x);
+ std::vector<int64_t> delays_ms_;
+ std::vector<size_t> throughput_bytes_;
+ // (Receiving rate - available bitrate per flow) * time window.
+ std::vector<int64_t> weighted_estimate_error_;
+ int64_t last_unweighted_estimate_error_;
+ int64_t optimal_throughput_bits_;
+ uint32_t last_total_available_bitrate_kbps_;
+ int64_t last_available_bitrate_per_flow_kbps_;
+ int64_t start_computing_metrics_ms_;
+ bool started_computing_metrics_;
+ std::string alg_name_;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(PacketReceiver);
};
} // namespace bwe

Powered by Google App Engine
This is Rietveld 408576698