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

Side by Side Diff: ui/events/latency_info.cc

Issue 1129063010: Let LatencyInfo async events be under category "latency_info" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: naming "latency_info" -> "latencyInfo" Created 5 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "ui/events/latency_info.h" 5 #include "ui/events/latency_info.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 } 289 }
290 290
291 if (trace_name_str) { 291 if (trace_name_str) {
292 if (IsInputLatencyBeginComponent(component)) 292 if (IsInputLatencyBeginComponent(component))
293 trace_name = std::string("InputLatency::") + trace_name_str; 293 trace_name = std::string("InputLatency::") + trace_name_str;
294 else 294 else
295 trace_name = std::string("Latency::") + trace_name_str; 295 trace_name = std::string("Latency::") + trace_name_str;
296 } 296 }
297 297
298 TRACE_EVENT_COPY_ASYNC_BEGIN_WITH_TIMESTAMP0( 298 TRACE_EVENT_COPY_ASYNC_BEGIN_WITH_TIMESTAMP0(
299 "benchmark", 299 "benchmark,latencyInfo",
300 trace_name.c_str(), 300 trace_name.c_str(),
301 TRACE_ID_DONT_MANGLE(trace_id), 301 TRACE_ID_DONT_MANGLE(trace_id),
302 ts); 302 ts);
303 } 303 }
304 304
305 TRACE_EVENT_FLOW_BEGIN1( 305 TRACE_EVENT_FLOW_BEGIN1(
306 "input,benchmark", "LatencyInfo.Flow", TRACE_ID_DONT_MANGLE(trace_id), 306 "input,benchmark", "LatencyInfo.Flow", TRACE_ID_DONT_MANGLE(trace_id),
307 "trace_id", trace_id); 307 "trace_id", trace_id);
308 } 308 }
309 309
(...skipping 15 matching lines...) Expand all
325 it->second.event_count = new_count; 325 it->second.event_count = new_count;
326 } 326 }
327 } 327 }
328 328
329 if (IsTerminalComponent(component) && trace_id != -1) { 329 if (IsTerminalComponent(component) && trace_id != -1) {
330 // Should only ever add terminal component once. 330 // Should only ever add terminal component once.
331 CHECK(!terminated); 331 CHECK(!terminated);
332 terminated = true; 332 terminated = true;
333 333
334 if (*benchmark_enabled) { 334 if (*benchmark_enabled) {
335 TRACE_EVENT_COPY_ASYNC_END1("benchmark", 335 TRACE_EVENT_COPY_ASYNC_END1("benchmark,latencyInfo",
336 trace_name.c_str(), 336 trace_name.c_str(),
337 TRACE_ID_DONT_MANGLE(trace_id), 337 TRACE_ID_DONT_MANGLE(trace_id),
338 "data", AsTraceableData(*this)); 338 "data", AsTraceableData(*this));
339 } 339 }
340 340
341 TRACE_EVENT_FLOW_END0( 341 TRACE_EVENT_FLOW_END0(
342 "input,benchmark", "LatencyInfo.Flow", TRACE_ID_DONT_MANGLE(trace_id)); 342 "input,benchmark", "LatencyInfo.Flow", TRACE_ID_DONT_MANGLE(trace_id));
343 } 343 }
344 } 344 }
345 345
(...skipping 20 matching lines...) Expand all
366 it++; 366 it++;
367 } 367 }
368 } 368 }
369 } 369 }
370 370
371 void LatencyInfo::Clear() { 371 void LatencyInfo::Clear() {
372 latency_components.clear(); 372 latency_components.clear();
373 } 373 }
374 374
375 } // namespace ui 375 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698