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

Remove the last windowing function and make the metric work in chromium.

Now tested with chromium's trace_processor_shell:

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 out/linux-release-tmp/trace_processor_shell

Bug: internal b/150600174
Change-Id: Ib1015fe876f60858b138838a1a34195a8f6e0884
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2095098Reviewed-by: default avatarStephen Nusko <nuskos@chromium.org>
Reviewed-by: default avatarMikhail Khokhlov <khokhlov@google.com>
Commit-Queue: Stephen Nusko <nuskos@chromium.org>
Auto-Submit: Stephen Nusko <nuskos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748296}
parent ccdf7d82
......@@ -168,11 +168,11 @@ DROP TABLE IF EXISTS ScrollJanksMaybeNull;
CREATE TABLE ScrollJanksMaybeNull AS
SELECT
ROW_NUMBER() OVER (ORDER BY currScrollTs ASC) AS rowNumber,
currBeginId,
currUpdateDur,
currScrollDur,
currScrollId,
currScrollTs,
CASE WHEN currBeginId != prevBeginId
THEN
0 ELSE
......@@ -204,6 +204,22 @@ CREATE TABLE ScrollJanksMaybeNull AS
GestureScrollUpdatesRowNumbers next ON currprev.currRowNumber + 1 = next.rowNumber
ORDER BY currprev.currScrollTs ASC;
-- TODO(nuskos): Once chromium TBMv3 supports windowing functions use
-- ROW_NUMBER(ORDER BY ts ASC) OVER() instead.
DROP TABLE IF EXISTS ScrollJanksMaybeNullRowNumbers;
CREATE TABLE ScrollJanksMaybeNullRowNumbers AS
SELECT
(SELECT COUNT(*)
FROM ScrollJanksMaybeNull prev
WHERE prev.currScrollTs < next.currScrollTs) + 1 as rowNumber,
*
FROM
ScrollJanksMaybeNull next;
-- This just lists outs the rowNumber (which is ordered by timestamp), its jank
-- status and information about the update and scroll overall. Basically
-- getting it into a next queriable format.
......@@ -219,7 +235,7 @@ CREATE TABLE ScrollJanks AS
(nextJank IS NOT NULL AND nextJank) OR
(prevJank IS NOT NULL AND prevJank)
AS jank
FROM ScrollJanksMaybeNull;
FROM ScrollJanksMaybeNullRowNumbers;
-- Compute the total amount of nanoseconds from Janky GestureScrollUpdates and
-- the total amount of nanoseconds we spent scrolling in the trace. Also need
......
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