Commit b301f66f authored by Stephen Nusko's avatar Stephen Nusko Committed by Commit Bot

We've landed a new jank metric which computes the percentage of time janky.

Add this to our waterfall FYI bot to start gather data in the lab on a trace
that just scrolls.

This metric has a couple differences since we can't use windowing functions and
the histogram format doesn't support microseconds so I used milliseconds instead.

I was able to get the results.json and using ui.perfetto.dev I verified
(minus the us -> ms and integer percentage -> floating percentage) that the
results are exactly the same.

You can run this (replacing paths and supplying your own trace file) with the
following command:

tools/perf/core/tbmv3/run_tbmv3_metric.py \
--trace ~/chromium-team/pixel4_220120_7_flings \
--metric janky_time_per_scroll_processing_time \
--trace-processor-path ../../perfetto/out/linux_clang_release/trace_processor_shell

Bug: internal b/150600174
Change-Id: I4acb2da4f998cc22ae537e4c38c9543cb2f2bae7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2087626
Commit-Queue: Stephen Nusko <nuskos@chromium.org>
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: default avatarSami Kyöstilä <skyostil@chromium.org>
Reviewed-by: default avatarMikhail Khokhlov <khokhlov@google.com>
Auto-Submit: Stephen Nusko <nuskos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747282}
parent 6d58f1d9
......@@ -29,6 +29,7 @@ class SystemHealthInfiniteScroll(system_health.MobileCommonSystemHealth):
options.SetTimelineBasedMetrics([
'tbmv3:scroll_jank_metric',
'tbmv3:janky_scroll_periods',
'tmbv3:janky_time_per_scroll_processing_time',
])
return options
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto2";
package perfetto.protos;
import "protos/perfetto/metrics/metrics.proto";
// A collection of metrics related to GestureScroll events. See the sql file for
// a detailed description of the variables below.
message JankyTimePerScrollProcessingTime {
optional double janky_time_per_scroll_processing_time_percentage = 1;
optional int64 gesture_scroll_milliseconds = 2;
optional int64 janky_gesture_scroll_milliseconds = 3;
optional int64 gesture_scroll_processing_milliseconds = 4;
optional int64 num_janky_gesture_scroll_updates = 5;
}
extend TraceMetrics {
optional JankyTimePerScrollProcessingTime
janky_time_per_scroll_processing_time = 454;
}
{
"name": "Janky Time per Processing Time Metric",
"description": "The percentage of time spent processing a scroll that we consider janky",
"histograms": [
{
"name": "janky_time_per_scroll_processing_time_percentage",
"description": "The percentage of time we consider janky of the total time spent on scrolling.",
"requiredCategories": ["latencyInfo"],
"unit": "n%_smallerIsBetter"
},
{
"name": "gesture_scroll_milliseconds",
"description": "The time in milliseconds we spent scrolling this trace.",
"requiredCategories": ["latencyInfo"],
"unit": "ms_biggerIsBetter"
},
{
"name": "janky_gesture_scroll_milliseconds",
"description": "The time in milliseconds we spent scrolling this trace that we consider janky.",
"requiredCategories": ["latencyInfo"],
"unit": "ms_smallerIsBetter"
},
{
"name": "gesture_scroll_processing_milliseconds",
"description": "The time in milliseconds we spent processing updates to the scroll this trace.",
"requiredCategories": ["latencyInfo"],
"unit": "ms_biggerIsBetter"
},
{
"name": "num_janky_gesture_scroll_updates",
"description": "The number of individual gesture scroll updates that we considered janky.",
"requiredCategories": ["latencyInfo"],
"unit": "count_smallerIsBetter"
}
]
}
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