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

Unified Diff: media/cast/logging/stats_util.cc

Issue 236123003: Cast: Provide more meaningful stats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile Created 6 years, 8 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 | « media/cast/logging/stats_util.h ('k') | media/cast/test/fake_receiver_time_offset_estimator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/logging/stats_util.cc
diff --git a/media/cast/logging/stats_util.cc b/media/cast/logging/stats_util.cc
deleted file mode 100644
index 9b50b5dd99b2e6d6975fbce30fe1419f63309790..0000000000000000000000000000000000000000
--- a/media/cast/logging/stats_util.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "media/cast/logging/stats_util.h"
-
-#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/values.h"
-
-namespace media {
-namespace cast {
-
-scoped_ptr<base::DictionaryValue> ConvertStats(
- const FrameStatsMap& frame_stats_map,
- const PacketStatsMap& packet_stats_map) {
- scoped_ptr<base::DictionaryValue> overall_stats(new base::DictionaryValue);
-
- scoped_ptr<base::DictionaryValue> overall_frame_stats(
- new base::DictionaryValue);
- for (FrameStatsMap::const_iterator it = frame_stats_map.begin();
- it != frame_stats_map.end();
- ++it) {
- scoped_ptr<base::DictionaryValue> frame_stats(new base::DictionaryValue);
-
- frame_stats->SetDouble("firstEventTime",
- it->second.first_event_time.ToInternalValue());
- frame_stats->SetDouble("lastEventTime",
- it->second.last_event_time.ToInternalValue());
- frame_stats->SetInteger("count", it->second.event_counter);
- frame_stats->SetInteger("sizeTotal", static_cast<int>(it->second.sum_size));
- frame_stats->SetInteger("minDelayMs",
- it->second.min_delay.InMilliseconds());
- frame_stats->SetInteger("maxDelayMs",
- it->second.max_delay.InMilliseconds());
- frame_stats->SetInteger("sumDelayMs",
- it->second.sum_delay.InMilliseconds());
-
- overall_frame_stats->Set(CastLoggingToString(it->first),
- frame_stats.release());
- }
-
- overall_stats->Set("frameStats", overall_frame_stats.release());
-
- scoped_ptr<base::DictionaryValue> overall_packet_stats(
- new base::DictionaryValue);
- for (PacketStatsMap::const_iterator it = packet_stats_map.begin();
- it != packet_stats_map.end();
- ++it) {
- scoped_ptr<base::DictionaryValue> packet_stats(new base::DictionaryValue);
-
- packet_stats->SetDouble("firstEventTime",
- it->second.first_event_time.ToInternalValue());
- packet_stats->SetDouble("lastEventTime",
- it->second.last_event_time.ToInternalValue());
- packet_stats->SetDouble("lastEventTime",
- it->second.last_event_time.ToInternalValue());
- packet_stats->SetInteger("count", it->second.event_counter);
- packet_stats->SetInteger("sizeTotal",
- static_cast<int>(it->second.sum_size));
-
- overall_packet_stats->Set(CastLoggingToString(it->first),
- packet_stats.release());
- }
-
- overall_stats->Set("packetStats", overall_packet_stats.release());
-
- return overall_stats.Pass();
-}
-
-} // namespace cast
-} // namespace media
« no previous file with comments | « media/cast/logging/stats_util.h ('k') | media/cast/test/fake_receiver_time_offset_estimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698