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

Unified Diff: media/cast/logging/logging_defines.h

Issue 130423007: Cast:Updating logging stats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « no previous file | media/cast/logging/logging_defines.cc » ('j') | media/cast/logging/logging_impl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/logging/logging_defines.h
diff --git a/media/cast/logging/logging_defines.h b/media/cast/logging/logging_defines.h
index f23aeb1ebbb12fa792a04477ab6922d02b117f84..737170df38c50e549795b461f93db1259aca610a 100644
--- a/media/cast/logging/logging_defines.h
+++ b/media/cast/logging/logging_defines.h
@@ -109,15 +109,39 @@ struct GenericEvent {
std::vector<base::TimeTicks> timestamp;
};
+// Generic statistics given the raw data. More specific data (e.g. frame rate
+// and bit rate) can be computed given the basic metrics.
+// Some of the metrics will only be set when applicable, e.g. delay and size.
imcheng 2014/01/22 21:03:37 For metrics that aren't always set, could you be m
mikhal1 2014/01/23 19:53:11 Done.
struct FrameLogStats {
FrameLogStats();
~FrameLogStats();
+ base::TimeTicks first_event_time;
+ base::TimeTicks last_event_time;
+ int event_counter;
+ int size_sum;
imcheng 2014/01/22 21:03:37 size_t?
mikhal1 2014/01/23 19:53:11 Done.
+ base::TimeDelta min_delay;
+ base::TimeDelta max_delay;
+ base::TimeDelta sum_delay;
+};
+
+struct PacketLogStats {
+ PacketLogStats();
+ ~PacketLogStats();
+ base::TimeTicks first_event_time;
+ base::TimeTicks last_event_time;
+ int event_counter;
+ size_t size_sum;
hguihot1 2014/01/22 21:13:05 |size_sum| here, but FrameLogStats uses |sum_delay
mikhal1 2014/01/23 19:53:11 Done.
+};
- double framerate_fps;
- double bitrate_kbps;
- int max_delay_ms;
- int min_delay_ms;
- int avg_delay_ms;
+struct GenericLogStats {
+ GenericLogStats();
+ ~GenericLogStats();
+ base::TimeTicks first_event_time;
+ base::TimeTicks last_event_time;
+ int event_counter;
+ int sum;
hguihot1 2014/01/22 21:13:05 Potential overflow? Should we use 64-bit for all s
mikhal1 2014/01/23 19:53:11 Depends on how often you'll reset it. Let's stick
+ int min;
+ int max;
hguihot1 2014/01/22 21:13:05 Having sum of squares as well would allow the call
mikhal1 2014/01/23 19:53:11 On the granularity of every time you poll it. If y
};
struct ReceiverRtcpEvent {
@@ -139,8 +163,9 @@ typedef std::multimap<uint32, ReceiverRtcpEvent> AudioRtcpRawMap;
typedef std::multimap<uint32, ReceiverRtcpEvent> VideoRtcpRawMap;
typedef std::map<CastLoggingEvent, linked_ptr<FrameLogStats > > FrameStatsMap;
imcheng 2014/01/22 21:03:37 Question: Why do stats maps use linked_ptrs but th
mikhal1 2014/01/23 19:53:11 Done.
-typedef std::map<CastLoggingEvent, double> PacketStatsMap;
-typedef std::map<CastLoggingEvent, double> GenericStatsMap;
+typedef std::map<CastLoggingEvent, linked_ptr<PacketLogStats > > PacketStatsMap;
+typedef std::map<CastLoggingEvent, linked_ptr<GenericLogStats > >
+ GenericStatsMap;
} // namespace cast
} // namespace media
« no previous file with comments | « no previous file | media/cast/logging/logging_defines.cc » ('j') | media/cast/logging/logging_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698