Commit dd2e3edd authored by Christopher Cameron's avatar Christopher Cameron Committed by Commit Bot

Remove Event.Latency.Browser.*{Acked,UI} histograms

These are marked as obsolete in histograms.xml, but are still being
generated.

Bug: 777695
Change-Id: I02797b2fc00dd5eff444104bc5b665755a360599
Reviewed-on: https://chromium-review.googlesource.com/826143Reviewed-by: default avatarTimothy Dresser <tdresser@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524151}
parent a7979399
......@@ -33,21 +33,6 @@ ukm::SourceId GenerateUkmSourceId() {
return ukm_recorder ? ukm_recorder->GetNewSourceID() : ukm::kInvalidSourceId;
}
std::string WebInputEventTypeToInputModalityString(WebInputEvent::Type type) {
if (type == blink::WebInputEvent::kMouseWheel) {
return "Wheel";
} else if (WebInputEvent::IsKeyboardEventType(type)) {
// We should only be reporting latency for key presses.
DCHECK(type == WebInputEvent::kRawKeyDown || type == WebInputEvent::kChar);
return "KeyPress";
} else if (WebInputEvent::IsMouseEventType(type)) {
return "Mouse";
} else if (WebInputEvent::IsTouchEventType(type)) {
return "Touch";
}
return "";
}
// LatencyComponents generated in the renderer must have component IDs
// provided to them by the browser process. This function adds the correct
// component ID where necessary.
......@@ -190,35 +175,6 @@ void RenderWidgetHostLatencyTracker::ComputeInputLatencyHistograms(
bool multi_finger_touch_gesture =
WebInputEvent::IsTouchEventType(type) && active_multi_finger_gesture_;
LatencyInfo::LatencyComponent ui_component;
if (latency.FindLatency(ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0,
&ui_component)) {
DCHECK_EQ(ui_component.event_count, 1u);
CONFIRM_EVENT_TIMES_EXIST(ui_component, rwh_component);
base::TimeDelta ui_delta =
rwh_component.last_event_time - ui_component.first_event_time;
if (latency.source_event_type() == ui::SourceEventType::WHEEL) {
UMA_HISTOGRAM_CUSTOM_COUNTS(
"Event.Latency.Browser.WheelUI",
std::max(static_cast<int64_t>(0), ui_delta.InMicroseconds()), 1,
20000, 100);
} else if (latency.source_event_type() == ui::SourceEventType::TOUCH) {
UMA_HISTOGRAM_CUSTOM_COUNTS(
"Event.Latency.Browser.TouchUI",
std::max(static_cast<int64_t>(0), ui_delta.InMicroseconds()), 1,
20000, 100);
} else if (latency.source_event_type() == ui::SourceEventType::KEY_PRESS) {
UMA_HISTOGRAM_CUSTOM_COUNTS(
"Event.Latency.Browser.KeyPressUI",
std::max(static_cast<int64_t>(0), ui_delta.InMicroseconds()), 1,
20000, 50);
} else {
// We should only report these histograms for wheel, touch and keyboard.
NOTREACHED();
}
}
bool action_prevented = ack_result == INPUT_EVENT_ACK_STATE_CONSUMED;
// Touchscreen tap and scroll gestures depend on the disposition of the touch
// start and the current touch. For touch start,
......@@ -260,13 +216,6 @@ void RenderWidgetHostLatencyTracker::ComputeInputLatencyHistograms(
"Event.Latency.BlockingTime." + event_name + default_action_status,
main_component, acked_component);
}
std::string input_modality = WebInputEventTypeToInputModalityString(type);
if (input_modality != "") {
UMA_HISTOGRAM_INPUT_LATENCY_HIGH_RESOLUTION_MICROSECONDS(
"Event.Latency.Browser." + input_modality + "Acked", rwh_component,
acked_component);
}
}
}
......
......@@ -312,9 +312,6 @@ TEST_F(RenderWidgetHostLatencyTrackerTest, TestWheelToFirstScrollHistograms) {
test_browser_client_.getTestRapporService()->GetReportsCount());
// UMA histograms.
EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelUI", 1));
EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelAcked", 1));
EXPECT_TRUE(
HistogramSizeEq("Event.Latency.ScrollBegin.Wheel."
"TimeToScrollUpdateSwapBegin2",
......@@ -428,9 +425,6 @@ TEST_F(RenderWidgetHostLatencyTrackerTest, TestWheelToScrollHistograms) {
test_browser_client_.getTestRapporService()->GetReportsCount());
// UMA histograms.
EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelUI", 1));
EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelAcked", 1));
EXPECT_TRUE(
HistogramSizeEq("Event.Latency.ScrollBegin.Wheel."
"TimeToScrollUpdateSwapBegin2",
......@@ -567,8 +561,6 @@ TEST_F(RenderWidgetHostLatencyTrackerTest, TestTouchToFirstScrollHistograms) {
test_browser_client_.getTestRapporService()->GetReportsCount());
// UMA histograms.
EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.TouchUI", 1));
EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.TouchAcked", 1));
EXPECT_TRUE(HistogramSizeEq(
"Event.Latency.ScrollBegin.Touch.TimeToScrollUpdateSwapBegin2", 1));
......@@ -807,10 +799,6 @@ TEST_F(RenderWidgetHostLatencyTrackerTest,
EXPECT_TRUE(key_latency.terminated());
}
EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelUI", 1));
EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.TouchUI", 1));
EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.WheelAcked", 1));
EXPECT_TRUE(HistogramSizeEq("Event.Latency.Browser.TouchAcked", 1));
EXPECT_TRUE(
HistogramSizeEq("Event.Latency.ScrollUpdate.TouchToHandled_Main", 0));
EXPECT_TRUE(
......@@ -1138,81 +1126,6 @@ TEST_F(RenderWidgetHostLatencyTrackerTest, KeyBlockingAndQueueingTime) {
ElementsAre(Bucket(event_timestamps_ms[2] - event_timestamps_ms[1], 1)));
}
TEST_F(RenderWidgetHostLatencyTrackerTest, KeyUILatency) {
// These numbers are sensitive to where the histogram buckets are.
int event_timestamps_microseconds[] = {100, 185};
NativeWebKeyboardEvent event(blink::WebKeyboardEvent::kChar,
blink::WebInputEvent::kNoModifiers,
base::TimeTicks::Now());
ui::LatencyInfo latency_info;
latency_info.set_trace_id(kTraceEventId);
latency_info.set_source_event_type(ui::SourceEventType::KEY_PRESS);
latency_info.AddLatencyNumberWithTimestamp(
ui::INPUT_EVENT_LATENCY_UI_COMPONENT, 0, 0,
base::TimeTicks() +
base::TimeDelta::FromMicroseconds(event_timestamps_microseconds[0]),
1);
// Add the BEGIN_RWH component explicitly here with a timestamp, instead of
// calling tracker()->OnInputEvent().
latency_info.AddLatencyNumberWithTimestamp(
ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT,
tracker()->latency_component_id(), 0,
base::TimeTicks() +
base::TimeDelta::FromMicroseconds(event_timestamps_microseconds[1]),
1);
tracker()->OnInputEventAck(event, &latency_info,
InputEventAckState::INPUT_EVENT_ACK_STATE_UNKNOWN);
EXPECT_THAT(
histogram_tester().GetAllSamples("Event.Latency.Browser.KeyPressUI"),
ElementsAre(Bucket(
event_timestamps_microseconds[1] - event_timestamps_microseconds[0],
1)));
}
TEST_F(RenderWidgetHostLatencyTrackerTest, KeyAckedLatency) {
// These numbers are sensitive to where the histogram buckets are.
int event_timestamps_microseconds[] = {11, 24};
NativeWebKeyboardEvent event(blink::WebKeyboardEvent::kRawKeyDown,
blink::WebInputEvent::kNoModifiers,
base::TimeTicks::Now());
ui::LatencyInfo latency_info;
latency_info.set_trace_id(kTraceEventId);
latency_info.set_source_event_type(ui::SourceEventType::KEY_PRESS);
// Add the BEGIN_RWH component explicitly here with a timestamp, instead of
// calling tracker()->OnInputEvent().
latency_info.AddLatencyNumberWithTimestamp(
ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT,
tracker()->latency_component_id(), 0,
base::TimeTicks() +
base::TimeDelta::FromMicroseconds(event_timestamps_microseconds[0]),
1);
// Add the ACK_RWH component explicitly here with a timestamp, instead of
// calling tracker()->OnInputEventAck().
latency_info.AddLatencyNumberWithTimestamp(
ui::INPUT_EVENT_LATENCY_ACK_RWH_COMPONENT, 0, 0,
base::TimeTicks() +
base::TimeDelta::FromMicroseconds(event_timestamps_microseconds[1]),
1);
// Call ComputeInputLatencyHistograms directly to avoid OnInputEventAck
// overwriting components.
tracker()->ComputeInputLatencyHistograms(
event.GetType(), tracker()->latency_component_id(), latency_info,
InputEventAckState::INPUT_EVENT_ACK_STATE_UNKNOWN);
EXPECT_THAT(
histogram_tester().GetAllSamples("Event.Latency.Browser.KeyPressAcked"),
ElementsAre(Bucket(
event_timestamps_microseconds[1] - event_timestamps_microseconds[0],
1)));
}
TEST_F(RenderWidgetHostLatencyTrackerTest, KeyEndToEndLatency) {
// These numbers are sensitive to where the histogram buckets are.
int event_timestamps_microseconds[] = {11, 24};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment