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

Side by Side Diff: content/renderer/render_widget.cc

Issue 138593003: Increased upper limit on renderer event latency UMA histogram. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactored old histograms using new fieldtrials Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/debug/trace_event_synthetic_delay.h" 10 #include "base/debug/trace_event_synthetic_delay.h"
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 } else { 1070 } else {
1071 latency_info_.push_back(latency_info); 1071 latency_info_.push_back(latency_info);
1072 } 1072 }
1073 1073
1074 base::TimeDelta now = base::TimeDelta::FromInternalValue( 1074 base::TimeDelta now = base::TimeDelta::FromInternalValue(
1075 base::TimeTicks::Now().ToInternalValue()); 1075 base::TimeTicks::Now().ToInternalValue());
1076 1076
1077 int64 delta = static_cast<int64>( 1077 int64 delta = static_cast<int64>(
1078 (now.InSecondsF() - input_event->timeStampSeconds) * 1078 (now.InSecondsF() - input_event->timeStampSeconds) *
1079 base::Time::kMicrosecondsPerSecond); 1079 base::Time::kMicrosecondsPerSecond);
1080 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.Renderer", delta, 0, 1000000, 100); 1080 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.AggregatedLatency.Renderer2",
1081 delta, 0, 10000000, 100);
1081 base::HistogramBase* counter_for_type = 1082 base::HistogramBase* counter_for_type =
1082 base::Histogram::FactoryGet( 1083 base::Histogram::FactoryGet(
1083 base::StringPrintf("Event.Latency.Renderer.%s", event_name), 1084 base::StringPrintf("Event.Latency.Renderer2.%s", event_name),
1084 0, 1085 0,
1085 1000000, 1086 10000000,
1086 100, 1087 100,
1087 base::HistogramBase::kUmaTargetedHistogramFlag); 1088 base::HistogramBase::kUmaTargetedHistogramFlag);
1088 counter_for_type->Add(delta); 1089 counter_for_type->Add(delta);
1089 1090
1090 bool prevent_default = false; 1091 bool prevent_default = false;
1091 if (WebInputEvent::isMouseEventType(input_event->type)) { 1092 if (WebInputEvent::isMouseEventType(input_event->type)) {
1092 const WebMouseEvent& mouse_event = 1093 const WebMouseEvent& mouse_event =
1093 *static_cast<const WebMouseEvent*>(input_event); 1094 *static_cast<const WebMouseEvent*>(input_event);
1094 TRACE_EVENT2("renderer", "HandleMouseMove", 1095 TRACE_EVENT2("renderer", "HandleMouseMove",
1095 "x", mouse_event.x, "y", mouse_event.y); 1096 "x", mouse_event.x, "y", mouse_event.y);
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after
2884 surface_id(), 2885 surface_id(),
2885 GetURLForGraphicsContext3D(), 2886 GetURLForGraphicsContext3D(),
2886 gpu_channel_host.get(), 2887 gpu_channel_host.get(),
2887 attributes, 2888 attributes,
2888 false /* bind generates resources */, 2889 false /* bind generates resources */,
2889 limits)); 2890 limits));
2890 return context.Pass(); 2891 return context.Pass();
2891 } 2892 }
2892 2893
2893 } // namespace content 2894 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698