OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 printf("%s\t", state.tag.c_str()); | 84 printf("%s\t", state.tag.c_str()); |
85 va_list args; | 85 va_list args; |
86 va_start(args, format); | 86 va_start(args, format); |
87 vprintf(format, args); | 87 vprintf(format, args); |
88 va_end(args); | 88 va_end(args); |
89 printf("\n"); | 89 printf("\n"); |
90 } | 90 } |
91 } | 91 } |
92 | 92 |
93 void Logging::Plot(int figure, double value) { | 93 void Logging::Plot(int figure, double value) { |
94 Plot(figure, value, ""); | 94 Plot(figure, value, "-"); |
95 } | 95 } |
96 | 96 |
97 void Logging::Plot(int figure, double value, const std::string& alg_name) { | 97 void Logging::Plot(int figure, double value, const std::string& alg_name) { |
98 CriticalSectionScoped cs(crit_sect_.get()); | 98 CriticalSectionScoped cs(crit_sect_.get()); |
99 ThreadMap::iterator it = thread_map_.find(ThreadWrapper::GetThreadId()); | 99 ThreadMap::iterator it = thread_map_.find(ThreadWrapper::GetThreadId()); |
100 assert(it != thread_map_.end()); | 100 assert(it != thread_map_.end()); |
101 const State& state = it->second.stack.top(); | 101 const State& state = it->second.stack.top(); |
102 std::string label = state.tag + '@' + alg_name; | 102 std::string label = state.tag + '@' + alg_name; |
103 std::string prefix("Available"); | 103 std::string prefix("Available"); |
104 if (alg_name.compare(0, prefix.length(), prefix) == 0) { | 104 if (alg_name.compare(0, prefix.length(), prefix) == 0) { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 // Update time so that next log/plot will use the latest time seen so far | 241 // Update time so that next log/plot will use the latest time seen so far |
242 // in this call tree. | 242 // in this call tree. |
243 state->timestamp_ms = std::max(state->timestamp_ms, newest_timestamp_ms); | 243 state->timestamp_ms = std::max(state->timestamp_ms, newest_timestamp_ms); |
244 } | 244 } |
245 } | 245 } |
246 } // namespace bwe | 246 } // namespace bwe |
247 } // namespace testing | 247 } // namespace testing |
248 } // namespace webrtc | 248 } // namespace webrtc |
249 | 249 |
250 #endif // BWE_TEST_LOGGING_COMPILE_TIME_ENABLE | 250 #endif // BWE_TEST_LOGGING_COMPILE_TIME_ENABLE |
OLD | NEW |