OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_PERF_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_PERF_H_ |
6 #define CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_PERF_H_ | 6 #define CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_PERF_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace base { | 10 namespace base { |
11 class DictionaryValue; | 11 class DictionaryValue; |
12 } | 12 } |
13 | 13 |
14 namespace test { | 14 namespace test { |
15 | 15 |
16 // These functions takes parsed data (on one peer connection) from the | 16 // These functions takes parsed data (on one peer connection) from the |
17 // peerConnectionDataStore object that is backing webrtc-internals and prints | 17 // peerConnectionDataStore object that is backing webrtc-internals and prints |
18 // metrics they consider interesting using testing/perf/perf_test.h primitives. | 18 // metrics they consider interesting using testing/perf/perf_test.h primitives. |
19 // The idea is to put as many webrtc-related metrics as possible into the | 19 // The idea is to put as many webrtc-related metrics as possible into the |
20 // dashboard and thereby track it for regressions. | 20 // dashboard and thereby track it for regressions. |
21 // | 21 // |
22 // These functions expect to run under googletest and will use EXPECT_ and | 22 // These functions expect to run under googletest and will use EXPECT_ and |
23 // ASSERT_ macros to signal failure. They take as argument one peer connection's | 23 // ASSERT_ macros to signal failure. They take as argument one peer connection's |
24 // stats data and a |modifier| to append to each result bucket. For instance, if | 24 // stats data and a |modifier| to append to each result bucket. For instance, if |
25 // the modifier is '_oneway', the rtt stat will be logged as goog_rtt in | 25 // the modifier is '_oneway', the rtt stat will be logged as goog_rtt in |
26 // the video_tx_oneway bucket. | 26 // the video_tx_oneway bucket. |
| 27 // If |video_codec| is a non-empty string, the codec name is appended last for |
| 28 // video metrics, e.g. 'video_tx_oneway_VP9'. |
27 void PrintBweForVideoMetrics(const base::DictionaryValue& pc_dict, | 29 void PrintBweForVideoMetrics(const base::DictionaryValue& pc_dict, |
28 const std::string& modifier); | 30 const std::string& modifier, |
| 31 const std::string& video_codec); |
29 void PrintMetricsForAllStreams(const base::DictionaryValue& pc_dict, | 32 void PrintMetricsForAllStreams(const base::DictionaryValue& pc_dict, |
30 const std::string& modifier); | 33 const std::string& modifier, |
| 34 const std::string& video_codec); |
31 | 35 |
32 } // namespace test | 36 } // namespace test |
33 | 37 |
34 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_PERF_H_ | 38 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_PERF_H_ |
OLD | NEW |