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

Side by Side Diff: base/test/trace_event_analyzer.h

Issue 2253973003: Add an explicit way of making IDs local or global (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lints Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Use trace_analyzer::Query and trace_analyzer::TraceAnalyzer to search for 5 // Use trace_analyzer::Query and trace_analyzer::TraceAnalyzer to search for
6 // specific trace events that were generated by the trace_event.h API. 6 // specific trace events that were generated by the trace_event.h API.
7 // 7 //
8 // Basic procedure: 8 // Basic procedure:
9 // - Get trace events JSON string from base::trace_event::TraceLog. 9 // - Get trace events JSON string from base::trace_event::TraceLog.
10 // - Create TraceAnalyzer with JSON string. 10 // - Create TraceAnalyzer with JSON string.
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 ProcessThreadID thread; 158 ProcessThreadID thread;
159 159
160 // Time since epoch in microseconds. 160 // Time since epoch in microseconds.
161 // Stored as double to match its JSON representation. 161 // Stored as double to match its JSON representation.
162 double timestamp; 162 double timestamp;
163 double duration; 163 double duration;
164 char phase; 164 char phase;
165 std::string category; 165 std::string category;
166 std::string name; 166 std::string name;
167 std::string id; 167 std::string id;
168 std::string local_id;
169 std::string global_id;
168 170
169 // All numbers and bool values from TraceEvent args are cast to double. 171 // All numbers and bool values from TraceEvent args are cast to double.
170 // bool becomes 1.0 (true) or 0.0 (false). 172 // bool becomes 1.0 (true) or 0.0 (false).
171 std::map<std::string, double> arg_numbers; 173 std::map<std::string, double> arg_numbers;
172 std::map<std::string, std::string> arg_strings; 174 std::map<std::string, std::string> arg_strings;
173 std::map<std::string, std::unique_ptr<base::Value>> arg_values; 175 std::map<std::string, std::unique_ptr<base::Value>> arg_values;
174 176
175 // The other event associated with this event (or NULL). 177 // The other event associated with this event (or NULL).
176 const TraceEvent* other_event; 178 const TraceEvent* other_event;
177 }; 179 };
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 708
707 // Count all matches. 709 // Count all matches.
708 static inline size_t CountMatches(const TraceEventVector& events, 710 static inline size_t CountMatches(const TraceEventVector& events,
709 const Query& query) { 711 const Query& query) {
710 return CountMatches(events, query, 0u, events.size()); 712 return CountMatches(events, query, 0u, events.size());
711 } 713 }
712 714
713 } // namespace trace_analyzer 715 } // namespace trace_analyzer
714 716
715 #endif // BASE_TEST_TRACE_EVENT_ANALYZER_H_ 717 #endif // BASE_TEST_TRACE_EVENT_ANALYZER_H_
OLDNEW
« no previous file with comments | « no previous file | base/test/trace_event_analyzer.cc » ('j') | base/trace_event/common/trace_event_common.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698