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

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: Using rtc::scoped_ptr on nada_unittest.cc Created 5 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
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..30192358cc0aff4c9f943405a40513e34c53d627 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/packet_receiver.h
+++ b/webrtc/modules/remote_bitrate_estimator/test/packet_receiver.h
@@ -17,6 +17,7 @@
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/remote_bitrate_estimator/test/bwe.h"
#include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h"
+#include "webrtc/modules/remote_bitrate_estimator/test/metric_recorder.h"
namespace webrtc {
namespace testing {
@@ -29,6 +30,12 @@ class PacketReceiver : public PacketProcessor {
BandwidthEstimatorType bwe_type,
bool plot_delay,
bool plot_bwe);
+ PacketReceiver(PacketProcessorListener* listener,
+ int flow_id,
+ BandwidthEstimatorType bwe_type,
+ bool plot_delay,
+ bool plot_bwe,
+ MetricRecorder* metric_recorder);
~PacketReceiver();
// Implements PacketProcessor.
@@ -38,30 +45,19 @@ class PacketReceiver : public PacketProcessor {
Stats<double> GetDelayStats() const;
+ float GlobalPacketLoss();
+
protected:
- void PlotDelay(int64_t arrival_time_ms, int64_t send_time_ms);
- void PlotObjectiveFunction(int64_t arrival_time_ms);
- void PlotPacketLoss(int64_t arrival_time_ms);
- double ObjectiveFunction();
+ void UpdateMetrics(int64_t arrival_time_ms,
+ int64_t send_time_ms,
+ size_t payload_size);
- int64_t now_ms_;
- std::string delay_log_prefix_;
- std::string metric_log_prefix_;
- std::string packet_loss_log_prefix_;
- int64_t last_delay_plot_ms_;
- int64_t last_metric_plot_ms_;
- int64_t last_packet_loss_plot_ms_;
- bool plot_delay_;
- bool plot_objective_function_;
- bool plot_packet_loss_;
Stats<double> delay_stats_;
rtc::scoped_ptr<BweReceiver> bwe_receiver_;
- int64_t total_delay_ms_;
- size_t total_throughput_;
- int number_packets_;
-
private:
+ MetricRecorder* metric_recorder_;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(PacketReceiver);
};
} // namespace bwe
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/test/packet.h ('k') | webrtc/modules/remote_bitrate_estimator/test/packet_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698