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

Unified Diff: remoting/protocol/performance_tracker.h

Issue 2096643003: Rework PerformanceTracker to make it usable with WebRTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address feedback Created 4 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
« no previous file with comments | « remoting/protocol/frame_stats.cc ('k') | remoting/protocol/performance_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/performance_tracker.h
diff --git a/remoting/protocol/performance_tracker.h b/remoting/protocol/performance_tracker.h
index c31ca91eb6774d750737130d62dc53674287d3ce..d89221b269ce52a5cd5cbba9a5e9ef9e2e161f05 100644
--- a/remoting/protocol/performance_tracker.h
+++ b/remoting/protocol/performance_tracker.h
@@ -7,8 +7,6 @@
#include <stdint.h>
-#include <map>
-
#include "base/callback.h"
#include "base/macros.h"
#include "base/timer/timer.h"
@@ -16,11 +14,10 @@
#include "remoting/base/running_samples.h"
namespace remoting {
-
-class VideoPacket;
-
namespace protocol {
+struct FrameStats;
+
// PerformanceTracker defines a bundle of performance counters and statistics
// for chromoting.
class PerformanceTracker {
@@ -56,14 +53,7 @@ class PerformanceTracker {
const RunningSamples& round_trip_ms() { return round_trip_ms_; }
// Record stats for a video-packet.
- void RecordVideoPacketStats(const VideoPacket& packet);
-
- // Helpers to track decode and paint time. If the render drops some frames
- // before they are painted then OnFramePainted() records paint time when the
- // following frame is rendered. OnFramePainted() may be called multiple times,
- // in which case all calls after the first one are ignored.
- void OnFrameDecoded(int32_t frame_id);
- void OnFramePainted(int32_t frame_id);
+ void RecordVideoFrameStats(const FrameStats& stats);
// Sets callbacks in ChromotingInstance to update a UMA custom counts, custom
// times or enum histogram.
@@ -75,24 +65,6 @@ class PerformanceTracker {
void OnPauseStateChanged(bool paused);
private:
- struct FrameTimestamps {
- FrameTimestamps();
- ~FrameTimestamps();
-
- // Set to null for frames that were not sent after a fresh input event.
- base::TimeTicks latest_event_timestamp;
-
- // Set to TimeDelta::Max() when unknown.
- base::TimeDelta total_host_latency;
-
- base::TimeTicks time_received;
- base::TimeTicks time_decoded;
- };
- typedef std::map<int32_t, FrameTimestamps> FramesTimestampsMap;
-
- // Helper to record input roundtrip latency after a frame has been painted.
- void RecordRoundTripLatency(const FrameTimestamps& timestamps);
-
// Updates frame-rate, packet-rate and bandwidth UMA statistics.
void UploadRateStatsToUma();
@@ -124,12 +96,6 @@ class PerformanceTracker {
UpdateUmaCustomHistogramCallback uma_custom_times_updater_;
UpdateUmaEnumHistogramCallback uma_enum_histogram_updater_;
- // The latest event timestamp that a VideoPacket was seen annotated with.
- base::TimeTicks latest_event_timestamp_;
-
- // Stores timestamps for the frames that are currently being processed.
- FramesTimestampsMap frame_timestamps_;
-
bool is_paused_ = false;
base::RepeatingTimer upload_uma_stats_timer_;
« no previous file with comments | « remoting/protocol/frame_stats.cc ('k') | remoting/protocol/performance_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698