[Scroll Jank] Add a top-level single scroll event. [chromium/src : main]

0 views
Skip to first unread message

Omar Elmekkawy (Gerrit)

unread,
Apr 24, 2024, 5:29:33 AMApr 24
to Harkiran Bolaria, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
Attention needed from Harkiran Bolaria

Omar Elmekkawy added 3 comments

Patchset-level comments
File-level comment, Patchset 12 (Latest):
Omar Elmekkawy . unresolved

Is the UKM data aggregated per session or per scroll? is the data we're getting from here comparable to UKM?

File cc/metrics/scroll_jank_ukm_reporter.cc
Line 114, Patchset 12 (Latest): TRACE_EVENT_INSTANT(
Omar Elmekkawy . unresolved

Can this be a normal trace event with the start and end times of the scroll?

Line 132, Patchset 12 (Latest): final_frame_presentation_timestamp_ = base::TimeTicks::Now();
Omar Elmekkawy . unresolved

in what cases will this be emitted without having the final presentation timestamp? last scroll?

Open in Gerrit

Related details

Attention is currently required from:
  • Harkiran Bolaria
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
Gerrit-Change-Number: 5385901
Gerrit-PatchSet: 12
Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
Gerrit-Attention: Harkiran Bolaria <hbol...@google.com>
Gerrit-Comment-Date: Wed, 24 Apr 2024 09:29:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Harkiran Bolaria (Gerrit)

unread,
Apr 24, 2024, 6:21:11 AMApr 24
to Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
Attention needed from Omar Elmekkawy

Harkiran Bolaria added 4 comments

Patchset-level comments
Harkiran Bolaria . resolved

Thanks for the review!

Omar Elmekkawy . unresolved

Is the UKM data aggregated per session or per scroll? is the data we're getting from here comparable to UKM?

Harkiran Bolaria

UKM metrics are per scroll; we emit them/reset them on each new scroll, with exponential bucketing. This metric is subject to the usual UKM downsampling as well.

File cc/metrics/scroll_jank_ukm_reporter.cc
Line 114, Patchset 12 (Latest): TRACE_EVENT_INSTANT(
Omar Elmekkawy . unresolved

Can this be a normal trace event with the start and end times of the scroll?

Harkiran Bolaria

Unfortunately there are a few cases where the start/ends of two consecutive scroll events overlap, and tracing doesn't appear to handle this well - e.g. the overlapping start/end are treated as a "mini" slice - see [screenshot](https://screenshot.googleplex.com/7NupmhiwseLDPrK) illustrating how this looks.

With the instant events, we can get the expected view using debug tracks.

Line 132, Patchset 12 (Latest): final_frame_presentation_timestamp_ = base::TimeTicks::Now();
Omar Elmekkawy . resolved

in what cases will this be emitted without having the final presentation timestamp? last scroll?

Harkiran Bolaria

Yes this would be the case.

Open in Gerrit

Related details

Attention is currently required from:
  • Omar Elmekkawy
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
Gerrit-Change-Number: 5385901
Gerrit-PatchSet: 12
Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
Gerrit-Attention: Omar Elmekkawy <me...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Apr 2024 10:21:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Omar Elmekkawy <me...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Omar Elmekkawy (Gerrit)

unread,
Apr 24, 2024, 6:27:41 AMApr 24
to Harkiran Bolaria, Stephen Nusko, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
Attention needed from Harkiran Bolaria and Stephen Nusko

Omar Elmekkawy added 2 comments

Patchset-level comments
Omar Elmekkawy . resolved

Is the UKM data aggregated per session or per scroll? is the data we're getting from here comparable to UKM?

Harkiran Bolaria

UKM metrics are per scroll; we emit them/reset them on each new scroll, with exponential bucketing. This metric is subject to the usual UKM downsampling as well.

Omar Elmekkawy

Thanks.

File cc/metrics/scroll_jank_ukm_reporter.cc
Line 114, Patchset 12 (Latest): TRACE_EVENT_INSTANT(
Omar Elmekkawy . unresolved

Can this be a normal trace event with the start and end times of the scroll?

Harkiran Bolaria

Unfortunately there are a few cases where the start/ends of two consecutive scroll events overlap, and tracing doesn't appear to handle this well - e.g. the overlapping start/end are treated as a "mini" slice - see [screenshot](https://screenshot.googleplex.com/7NupmhiwseLDPrK) illustrating how this looks.

With the instant events, we can get the expected view using debug tracks.

Omar Elmekkawy

+ @nus...@chromium.org for tracing expertise, is there any way around this?

Open in Gerrit

Related details

Attention is currently required from:
  • Harkiran Bolaria
  • Stephen Nusko
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
Gerrit-Change-Number: 5385901
Gerrit-PatchSet: 12
Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
Gerrit-Attention: Harkiran Bolaria <hbol...@google.com>
Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Apr 2024 10:27:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Omar Elmekkawy <me...@chromium.org>
Comment-In-Reply-To: Harkiran Bolaria <hbol...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Omar Elmekkawy (Gerrit)

unread,
Apr 24, 2024, 6:27:52 AMApr 24
to Harkiran Bolaria, Stephen Nusko, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
Attention needed from Harkiran Bolaria and Stephen Nusko

Omar Elmekkawy voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Harkiran Bolaria
  • Stephen Nusko
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
Gerrit-Change-Number: 5385901
Gerrit-PatchSet: 12
Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
Gerrit-Attention: Harkiran Bolaria <hbol...@google.com>
Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Apr 2024 10:27:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Harkiran Bolaria (Gerrit)

unread,
Apr 24, 2024, 12:01:36 PMApr 24
to Omar Elmekkawy, Stephen Nusko, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
Attention needed from Harkiran Bolaria

Harkiran Bolaria added 1 comment

File cc/metrics/scroll_jank_ukm_reporter.cc
Line 114, Patchset 12 (Latest): TRACE_EVENT_INSTANT(
Omar Elmekkawy . unresolved

Can this be a normal trace event with the start and end times of the scroll?

Harkiran Bolaria

Unfortunately there are a few cases where the start/ends of two consecutive scroll events overlap, and tracing doesn't appear to handle this well - e.g. the overlapping start/end are treated as a "mini" slice - see [screenshot](https://screenshot.googleplex.com/7NupmhiwseLDPrK) illustrating how this looks.

With the instant events, we can get the expected view using debug tracks.

Omar Elmekkawy

+ @nus...@chromium.org for tracing expertise, is there any way around this?

Harkiran Bolaria

Just spoke with Stephen offline, we can achieve this by doing what EventLatency does, rather than separate instant events. I will re-upload once I've tested/implemented this way.

Open in Gerrit

Related details

Attention is currently required from:
  • Harkiran Bolaria
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
Gerrit-Change-Number: 5385901
Gerrit-PatchSet: 12
Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
Gerrit-Attention: Harkiran Bolaria <hbol...@google.com>
Gerrit-Comment-Date: Wed, 24 Apr 2024 16:01:22 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Harkiran Bolaria (Gerrit)

unread,
Apr 25, 2024, 8:32:21 AMApr 25
to Omar Elmekkawy, Stephen Nusko, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com

Harkiran Bolaria voted and added 1 comment

Votes added by Harkiran Bolaria

Commit-Queue+1

1 comment

File cc/metrics/scroll_jank_ukm_reporter.cc
Line 114, Patchset 12: TRACE_EVENT_INSTANT(
Omar Elmekkawy . resolved

Can this be a normal trace event with the start and end times of the scroll?

Harkiran Bolaria

Unfortunately there are a few cases where the start/ends of two consecutive scroll events overlap, and tracing doesn't appear to handle this well - e.g. the overlapping start/end are treated as a "mini" slice - see [screenshot](https://screenshot.googleplex.com/7NupmhiwseLDPrK) illustrating how this looks.

With the instant events, we can get the expected view using debug tracks.

Omar Elmekkawy

+ @nus...@chromium.org for tracing expertise, is there any way around this?

Harkiran Bolaria

Just spoke with Stephen offline, we can achieve this by doing what EventLatency does, rather than separate instant events. I will re-upload once I've tested/implemented this way.

Harkiran Bolaria

Fixed using EventLatency as an example: https://screenshot.googleplex.com/NcmNg8JnWATzjEU

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
Gerrit-Change-Number: 5385901
Gerrit-PatchSet: 13
Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
Gerrit-Comment-Date: Thu, 25 Apr 2024 12:32:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Stephen Nusko (Gerrit)

unread,
Apr 25, 2024, 10:27:45 AMApr 25
to Harkiran Bolaria, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
Attention needed from Harkiran Bolaria

Stephen Nusko voted and added 4 comments

Votes added by Stephen Nusko

Code-Review+1

4 comments

File cc/metrics/scroll_jank_ukm_reporter.cc
Line 53, Patchset 13 (Latest): WriteScrollTraceEvent();
Stephen Nusko . unresolved

Does UKM ever not get called when something like our scroll jank metric tracker would be? I.E. should this be in the dropped frame tracker instead? If they both get called always then this is fine since it has all the UKM data, but if there are cases where it isn't called the other spot might be better.

Line 111, Patchset 13 (Latest): // Use instant trace events and join in SQL based on the common frame
// event latency id, as on a few occasions, the end timestamp will occur
// after the next scroll starts.
Stephen Nusko . unresolved

Comment needs updating.

Line 116, Patchset 13 (Latest): perfetto::Track(base::trace_event::GetNextGlobalTraceId());
Stephen Nusko . unresolved

If you want

you can name this track as described [here](https://source.chromium.org/chromium/chromium/src/+/main:third_party/perfetto/include/perfetto/tracing/track.h;l=65-69;drc=1286fac3db4268900d4683fd4f4e00a187fd92ff)

```
// auto desc = track.Serialize();
// desc.set_name("MyTrack");
// perfetto::TrackEvent::SetTrackDescriptor(track, desc);
```

And then you can continue to emit `Scroll ##` if you want.

I believe that works in the UI for track collapsing, but perhaps it doesn't so please double check me on that.

File content/browser/renderer_host/input/scroll_tracing_browsertest.cc
Line 34, Patchset 13 (Latest): ~ScrollTracingBrowserTest() override {}
Stephen Nusko . unresolved

use '= default' to define a trivial destructor (https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html)

(Lint observed on `android-clang-tidy-rel` and `linux-clang-tidy-rel`)

Please fix.

Open in Gerrit

Related details

Attention is currently required from:
  • Harkiran Bolaria
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
    Gerrit-Change-Number: 5385901
    Gerrit-PatchSet: 13
    Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
    Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
    Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
    Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
    Gerrit-Attention: Harkiran Bolaria <hbol...@google.com>
    Gerrit-Comment-Date: Thu, 25 Apr 2024 14:27:32 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Harkiran Bolaria (Gerrit)

    unread,
    Apr 29, 2024, 6:03:49 AMApr 29
    to Alexander Timin, Stephen Nusko, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com

    Harkiran Bolaria added 5 comments

    Patchset-level comments
    File-level comment, Patchset 14 (Latest):
    Harkiran Bolaria . resolved

    Addressed all comments, once the try-bots confirm, I will add owners for final approvals.

    File cc/metrics/scroll_jank_ukm_reporter.cc
    Line 53, Patchset 13: WriteScrollTraceEvent();
    Stephen Nusko . resolved

    Does UKM ever not get called when something like our scroll jank metric tracker would be? I.E. should this be in the dropped frame tracker instead? If they both get called always then this is fine since it has all the UKM data, but if there are cases where it isn't called the other spot might be better.

    Harkiran Bolaria

    These are both called at the same time [here](https://source.chromium.org/chromium/chromium/src/+/main:cc/metrics/compositor_frame_reporter.cc;l=1620;drc=b6a0720ebf2f236e9ab95c65b9023b657c77e6f3).

    And to confirm, a [screenshot](https://screenshot.googleplex.com/8fKjsc4jcSCdP8Q) showing when ScrollJankDroppedFrameTracker::OnScrollStarted and ScrollJankUkmReporter::WriteScrollTraceEvent are called, recording all details of the previous scroll.

    Line 111, Patchset 13: // Use instant trace events and join in SQL based on the common frame

    // event latency id, as on a few occasions, the end timestamp will occur
    // after the next scroll starts.
    Stephen Nusko . resolved

    Comment needs updating.

    Harkiran Bolaria

    Done

    Line 116, Patchset 13: perfetto::Track(base::trace_event::GetNextGlobalTraceId());
    Stephen Nusko . resolved

    If you want

    you can name this track as described [here](https://source.chromium.org/chromium/chromium/src/+/main:third_party/perfetto/include/perfetto/tracing/track.h;l=65-69;drc=1286fac3db4268900d4683fd4f4e00a187fd92ff)

    ```
    // auto desc = track.Serialize();
    // desc.set_name("MyTrack");
    // perfetto::TrackEvent::SetTrackDescriptor(track, desc);
    ```

    And then you can continue to emit `Scroll ##` if you want.

    I believe that works in the UI for track collapsing, but perhaps it doesn't so please double check me on that.

    Harkiran Bolaria

    It looks like this use case is deprecated per the code [here](https://cs.android.com/android/platform/superproject/main/+/main:external/perfetto/include/perfetto/tracing/internal/track_event_data_source.h;l=507;drc=074bb2dc367bde42b837a8de4d4e88f26c074c32;bpv=1;bpt=1) and the documentation might be out of date.

    Scroll ID was also an arbitrary ID I added based on the first event latency id, and each slice will have an id, so I think this version of the implementation, similar to EventLatency would be sufficient.

    File content/browser/renderer_host/input/scroll_tracing_browsertest.cc
    Line 34, Patchset 13: ~ScrollTracingBrowserTest() override {}
    Stephen Nusko . resolved

    use '= default' to define a trivial destructor (https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html)

    (Lint observed on `android-clang-tidy-rel` and `linux-clang-tidy-rel`)

    Please fix.

    Harkiran Bolaria

    Done

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
    Gerrit-Change-Number: 5385901
    Gerrit-PatchSet: 14
    Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
    Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
    Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
    Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
    Gerrit-CC: Alexander Timin <alt...@chromium.org>
    Gerrit-Comment-Date: Mon, 29 Apr 2024 10:03:34 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Stephen Nusko <nus...@chromium.org>
    satisfied_requirement
    open
    diffy

    Stephen Nusko (Gerrit)

    unread,
    Apr 29, 2024, 7:22:22 AMApr 29
    to Harkiran Bolaria, Alexander Timin, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
    Attention needed from Harkiran Bolaria

    Stephen Nusko voted and added 3 comments

    Votes added by Stephen Nusko

    Code-Review+1

    3 comments

    Commit Message
    Line 11, Patchset 14 (Latest):Note that recording a single TRACE_EVENT_BEGIN/TRACE_EVENT_END
    event is not processed correctly in cases where different scroll
    events have overlapping start/ends. Use event latency id to
    join start and end timestamps to determine the actual scroll
    duration.
    Stephen Nusko . unresolved

    Does this need updating?

    File base/tracing/protos/chrome_track_event.proto
    Line 1553, Patchset 14 (Latest): optional int64 first_event_latency_id = 1;
    Stephen Nusko . unresolved

    What is this event for?

    File content/browser/renderer_host/input/scroll_tracing_browsertest.cc
    Line 169, Patchset 14 (Latest): ValidateUkm(
    url, ukm::builders::Event_Scroll::kEntryName,
    {
    {ukm::builders::Event_Scroll::kFrameCountName,
    ConvertToHistogramValue(scroll_metrics[0])},
    {ukm::builders::Event_Scroll::kVsyncCountName,
    ConvertToHistogramValue(scroll_metrics[1])},
    {ukm::builders::Event_Scroll::kScrollJank_MissedVsyncsMaxName,
    ConvertToHistogramValue(scroll_metrics[2])},
    {ukm::builders::Event_Scroll::kScrollJank_MissedVsyncsSumName,
    ConvertToHistogramValue(scroll_metrics[3])},
    {ukm::builders::Event_Scroll::kScrollJank_DelayedFrameCountName,
    ConvertToHistogramValue(scroll_metrics[4])},
    {ukm::builders::Event_Scroll::kPredictorJankyFrameCountName,
    ConvertToHistogramValue(scroll_metrics[5])},
    });
    Stephen Nusko . unresolved

    this is strange, we have two computed things compared against each other, one of them should be compared against the real expected value as well.

    I.E.

    how many frame counts, if they all become zero because some bug nothing will catch that.

    So I would do a

    EXPECT_THAT(scroll_metrics, ....); expecting on real values. And then do this ValidateUkm using scroll_metrics we have verified.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Harkiran Bolaria
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
      Gerrit-Change-Number: 5385901
      Gerrit-PatchSet: 14
      Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
      Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
      Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
      Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
      Gerrit-CC: Alexander Timin <alt...@chromium.org>
      Gerrit-Attention: Harkiran Bolaria <hbol...@google.com>
      Gerrit-Comment-Date: Mon, 29 Apr 2024 11:22:09 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Harkiran Bolaria (Gerrit)

      unread,
      Apr 29, 2024, 7:34:01 AMApr 29
      to Jonathan Ross, Alexander Timin, Stephen Nusko, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
      Attention needed from Harkiran Bolaria and Jonathan Ross

      Harkiran Bolaria voted and added 1 comment

      Votes added by Harkiran Bolaria

      Commit-Queue+1

      1 comment

      Patchset-level comments
      Harkiran Bolaria . resolved

      Adding Jon for owners approval, we are just adding a trace event to be recorded whenever we record UKM for scrolls/janks from the compositor. The original patch adding this is available [here](https://chromium-review.googlesource.com/c/chromium/src/+/5088868) for context.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Harkiran Bolaria
      • Jonathan Ross
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
      Gerrit-Change-Number: 5385901
      Gerrit-PatchSet: 14
      Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
      Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
      Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
      Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
      Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
      Gerrit-CC: Alexander Timin <alt...@chromium.org>
      Gerrit-Attention: Harkiran Bolaria <hbol...@google.com>
      Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
      Gerrit-Comment-Date: Mon, 29 Apr 2024 11:33:46 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Harkiran Bolaria (Gerrit)

      unread,
      Apr 29, 2024, 7:36:53 AMApr 29
      to Jonathan Ross, Alexander Timin, Stephen Nusko, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
      Attention needed from Jonathan Ross

      Harkiran Bolaria voted and added 2 comments

      Votes added by Harkiran Bolaria

      Commit-Queue+1

      2 comments

      Commit Message
      Line 11, Patchset 14:Note that recording a single TRACE_EVENT_BEGIN/TRACE_EVENT_END

      event is not processed correctly in cases where different scroll
      events have overlapping start/ends. Use event latency id to
      join start and end timestamps to determine the actual scroll
      duration.
      Stephen Nusko . resolved

      Does this need updating?

      Harkiran Bolaria

      Done

      File content/browser/renderer_host/input/scroll_tracing_browsertest.cc

      url, ukm::builders::Event_Scroll::kEntryName,
      {
      {ukm::builders::Event_Scroll::kFrameCountName,
      ConvertToHistogramValue(scroll_metrics[0])},
      {ukm::builders::Event_Scroll::kVsyncCountName,
      ConvertToHistogramValue(scroll_metrics[1])},
      {ukm::builders::Event_Scroll::kScrollJank_MissedVsyncsMaxName,
      ConvertToHistogramValue(scroll_metrics[2])},
      {ukm::builders::Event_Scroll::kScrollJank_MissedVsyncsSumName,
      ConvertToHistogramValue(scroll_metrics[3])},
      {ukm::builders::Event_Scroll::kScrollJank_DelayedFrameCountName,
      ConvertToHistogramValue(scroll_metrics[4])},
      {ukm::builders::Event_Scroll::kPredictorJankyFrameCountName,
      ConvertToHistogramValue(scroll_metrics[5])},
      });
      Stephen Nusko . unresolved

      this is strange, we have two computed things compared against each other, one of them should be compared against the real expected value as well.

      I.E.

      how many frame counts, if they all become zero because some bug nothing will catch that.

      So I would do a

      EXPECT_THAT(scroll_metrics, ....); expecting on real values. And then do this ValidateUkm using scroll_metrics we have verified.

      Harkiran Bolaria

      For context: this was the methodology requested by Alexander for testing CUI (see crrev.com/c/5307374 and crrev.com/c/5307703 for parity matching), rather than checking the actual values. However I will update the patch here with checks for the actual values.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Jonathan Ross
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
      Gerrit-Change-Number: 5385901
      Gerrit-PatchSet: 14
      Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
      Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
      Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
      Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
      Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
      Gerrit-CC: Alexander Timin <alt...@chromium.org>
      Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
      Gerrit-Comment-Date: Mon, 29 Apr 2024 11:36:41 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Stephen Nusko <nus...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Harkiran Bolaria (Gerrit)

      unread,
      Apr 29, 2024, 1:18:11 PMApr 29
      to Jonathan Ross, Alexander Timin, Stephen Nusko, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
      Attention needed from Jonathan Ross and Stephen Nusko

      Harkiran Bolaria added 2 comments

      File base/tracing/protos/chrome_track_event.proto
      Line 1553, Patchset 14: optional int64 first_event_latency_id = 1;
      Stephen Nusko . resolved

      What is this event for?

      Harkiran Bolaria

      Initially used to join instant events, removed now.

      File content/browser/renderer_host/input/scroll_tracing_browsertest.cc
      Line 169, Patchset 14: ValidateUkm(
      url, ukm::builders::Event_Scroll::kEntryName,
      {
      {ukm::builders::Event_Scroll::kFrameCountName,
      ConvertToHistogramValue(scroll_metrics[0])},
      {ukm::builders::Event_Scroll::kVsyncCountName,
      ConvertToHistogramValue(scroll_metrics[1])},
      {ukm::builders::Event_Scroll::kScrollJank_MissedVsyncsMaxName,
      ConvertToHistogramValue(scroll_metrics[2])},
      {ukm::builders::Event_Scroll::kScrollJank_MissedVsyncsSumName,
      ConvertToHistogramValue(scroll_metrics[3])},
      {ukm::builders::Event_Scroll::kScrollJank_DelayedFrameCountName,
      ConvertToHistogramValue(scroll_metrics[4])},
      {ukm::builders::Event_Scroll::kPredictorJankyFrameCountName,
      ConvertToHistogramValue(scroll_metrics[5])},
      });
      Stephen Nusko . unresolved

      this is strange, we have two computed things compared against each other, one of them should be compared against the real expected value as well.

      I.E.

      how many frame counts, if they all become zero because some bug nothing will catch that.

      So I would do a

      EXPECT_THAT(scroll_metrics, ....); expecting on real values. And then do this ValidateUkm using scroll_metrics we have verified.

      Harkiran Bolaria

      For context: this was the methodology requested by Alexander for testing CUI (see crrev.com/c/5307374 and crrev.com/c/5307703 for parity matching), rather than checking the actual values. However I will update the patch here with checks for the actual values.

      Harkiran Bolaria

      I found that exact values weren't always consistent across devices or test runs, so I have implemented as close to exact matching as possible, with checks of approximate values instead. Will verify against the try bots to confirm if this works.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Jonathan Ross
      • Stephen Nusko
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
      Gerrit-Change-Number: 5385901
      Gerrit-PatchSet: 16
      Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
      Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
      Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
      Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
      Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
      Gerrit-CC: Alexander Timin <alt...@chromium.org>
      Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
      Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
      Gerrit-Comment-Date: Mon, 29 Apr 2024 17:17:54 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Harkiran Bolaria <hbol...@google.com>
      Comment-In-Reply-To: Stephen Nusko <nus...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Harkiran Bolaria (Gerrit)

      unread,
      Apr 30, 2024, 6:43:30 AMApr 30
      to Jonathan Ross, Alexander Timin, Stephen Nusko, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
      Attention needed from Jonathan Ross

      Harkiran Bolaria added 1 comment

      Patchset-level comments
      File-level comment, Patchset 16 (Latest):
      Harkiran Bolaria . unresolved

      Investigating flake failures and will update accordingly.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Jonathan Ross
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
      Gerrit-Change-Number: 5385901
      Gerrit-PatchSet: 16
      Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
      Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
      Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
      Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
      Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
      Gerrit-CC: Alexander Timin <alt...@chromium.org>
      Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
      Gerrit-Comment-Date: Tue, 30 Apr 2024 10:43:15 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Harkiran Bolaria (Gerrit)

      unread,
      Apr 30, 2024, 5:56:18 PMApr 30
      to Jonathan Ross, Alexander Timin, Stephen Nusko, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
      Attention needed from Jonathan Ross

      Harkiran Bolaria added 2 comments

      Patchset-level comments
      File-level comment, Patchset 16:
      Harkiran Bolaria . resolved

      Investigating flake failures and will update accordingly.

      Harkiran Bolaria

      Done

      File content/browser/renderer_host/input/scroll_tracing_browsertest.cc
      Line 169, Patchset 14: ValidateUkm(
      url, ukm::builders::Event_Scroll::kEntryName,
      {
      {ukm::builders::Event_Scroll::kFrameCountName,
      ConvertToHistogramValue(scroll_metrics[0])},
      {ukm::builders::Event_Scroll::kVsyncCountName,
      ConvertToHistogramValue(scroll_metrics[1])},
      {ukm::builders::Event_Scroll::kScrollJank_MissedVsyncsMaxName,
      ConvertToHistogramValue(scroll_metrics[2])},
      {ukm::builders::Event_Scroll::kScrollJank_MissedVsyncsSumName,
      ConvertToHistogramValue(scroll_metrics[3])},
      {ukm::builders::Event_Scroll::kScrollJank_DelayedFrameCountName,
      ConvertToHistogramValue(scroll_metrics[4])},
      {ukm::builders::Event_Scroll::kPredictorJankyFrameCountName,
      ConvertToHistogramValue(scroll_metrics[5])},
      });
      Stephen Nusko . resolved

      this is strange, we have two computed things compared against each other, one of them should be compared against the real expected value as well.

      I.E.

      how many frame counts, if they all become zero because some bug nothing will catch that.

      So I would do a

      EXPECT_THAT(scroll_metrics, ....); expecting on real values. And then do this ValidateUkm using scroll_metrics we have verified.

      Harkiran Bolaria

      For context: this was the methodology requested by Alexander for testing CUI (see crrev.com/c/5307374 and crrev.com/c/5307703 for parity matching), rather than checking the actual values. However I will update the patch here with checks for the actual values.

      Harkiran Bolaria

      I found that exact values weren't always consistent across devices or test runs, so I have implemented as close to exact matching as possible, with checks of approximate values instead. Will verify against the try bots to confirm if this works.

      Harkiran Bolaria

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Jonathan Ross
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
      Gerrit-Change-Number: 5385901
      Gerrit-PatchSet: 19
      Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
      Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
      Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
      Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
      Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
      Gerrit-CC: Alexander Timin <alt...@chromium.org>
      Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
      Gerrit-Comment-Date: Tue, 30 Apr 2024 21:56:01 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      open
      diffy

      Jonathan Ross (Gerrit)

      unread,
      May 2, 2024, 12:04:57 PMMay 2
      to Harkiran Bolaria, Alexander Timin, Stephen Nusko, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
      Attention needed from Harkiran Bolaria

      Jonathan Ross added 3 comments

      File cc/metrics/scroll_jank_ukm_reporter.h
      Line 33, Patchset 19 (Latest): void EmitPredictorJankUkm();
      Jonathan Ross . unresolved

      Nit: move to private since new `UpdateLatestFrameAndEmitPredictorJank` will control emitting

      File cc/metrics/scroll_jank_ukm_reporter.cc
      Line 108, Patchset 19 (Latest): if (first_frame_timestamp_ != base::TimeTicks::Min()) {
      Jonathan Ross . unresolved

      If we have no timings, should we perform the rest of `EmitScrollJankUkm`?

      Line 124, Patchset 19 (Latest): if (final_frame_presentation_timestamp_ == base::TimeTicks::Min()) {
      Jonathan Ross . unresolved

      Should this be a check? Or an early exit?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Harkiran Bolaria
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
        Gerrit-Change-Number: 5385901
        Gerrit-PatchSet: 19
        Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
        Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
        Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
        Gerrit-CC: Alexander Timin <alt...@chromium.org>
        Gerrit-Attention: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Comment-Date: Thu, 02 May 2024 16:04:44 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Stephen Nusko (Gerrit)

        unread,
        May 2, 2024, 1:12:53 PMMay 2
        to Harkiran Bolaria, Jonathan Ross, Alexander Timin, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
        Attention needed from Harkiran Bolaria

        Stephen Nusko voted and added 2 comments

        Votes added by Stephen Nusko

        Code-Review+1

        2 comments

        File cc/metrics/scroll_jank_ukm_reporter.cc
        Line 80, Patchset 19 (Latest): final_frame_presentation_timestamp_ = latest_timestamp;
        Stephen Nusko . unresolved

        Does this need to be a member variable? Could we just pass it to WriteScrollTraceEvent() right here?

        File content/browser/renderer_host/input/scroll_tracing_browsertest.cc
        Line 177, Patchset 19 (Latest): EXPECT_GE(ConvertToHistogramValue(scroll_metrics[2]), 0);
        EXPECT_LE(ConvertToHistogramValue(scroll_metrics[2]), 1);
        Stephen Nusko . unresolved

        Lets introduce a jank here so we can go EXPECT_GE 1 and that way this test ensures we're tracking something.

        I'll do some code diving but I think we can create a synthetic Gesture Controller ourselves and then inject explicitly the timestamps to ensure we hit a jank.

        I talked a bit offline with you, but will also try to get you some code links tomorrow.

        Gerrit-Comment-Date: Thu, 02 May 2024 17:12:38 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Harkiran Bolaria (Gerrit)

        unread,
        May 7, 2024, 4:22:21 AMMay 7
        to Jonathan Ross, Alexander Timin, Stephen Nusko, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com

        Harkiran Bolaria added 5 comments

        Patchset-level comments
        File-level comment, Patchset 19:
        Harkiran Bolaria . resolved

        Partially addressed review comments; updated tests to be included in next upload, when I will add reviewers back to attention set.

        File cc/metrics/scroll_jank_ukm_reporter.h
        Line 33, Patchset 19: void EmitPredictorJankUkm();
        Jonathan Ross . resolved

        Nit: move to private since new `UpdateLatestFrameAndEmitPredictorJank` will control emitting

        Harkiran Bolaria

        Done

        File cc/metrics/scroll_jank_ukm_reporter.cc
        Line 80, Patchset 19: final_frame_presentation_timestamp_ = latest_timestamp;
        Stephen Nusko . resolved

        Does this need to be a member variable? Could we just pass it to WriteScrollTraceEvent() right here?

        Harkiran Bolaria

        I think we'd want to keep it, as we call WriteScrollTraceEvent in EmitScrollJankUkm, which is called in a few other places where we won't necessarily know the latest frame timestamp without caching it (e.g. in the destructor)

        Line 108, Patchset 19: if (first_frame_timestamp_ != base::TimeTicks::Min()) {
        Jonathan Ross . resolved

        If we have no timings, should we perform the rest of `EmitScrollJankUkm`?

        Harkiran Bolaria

        No, we shouldn't; updated accordingly. For the first scroll of the session, there wouldn't really be any previous metrics we'd want to track (the only case where either timestamp value would be null.

        Line 124, Patchset 19: if (final_frame_presentation_timestamp_ == base::TimeTicks::Min()) {
        Jonathan Ross . resolved

        Should this be a check? Or an early exit?

        Harkiran Bolaria

        Addressed as with other comment on first_frame_timetamp_. Thanks!

        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
        Gerrit-Change-Number: 5385901
        Gerrit-PatchSet: 19
        Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
        Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
        Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
        Gerrit-CC: Alexander Timin <alt...@chromium.org>
        Gerrit-Comment-Date: Tue, 07 May 2024 08:22:10 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Jonathan Ross <jon...@chromium.org>
        Comment-In-Reply-To: Stephen Nusko <nus...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Stephen Nusko (Gerrit)

        unread,
        May 7, 2024, 5:55:38 AMMay 7
        to Harkiran Bolaria, Jonathan Ross, Alexander Timin, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
        Attention needed from Harkiran Bolaria

        Stephen Nusko voted and added 2 comments

        Votes added by Stephen Nusko

        Code-Review+1

        2 comments

        File content/browser/renderer_host/input/scroll_tracing_browsertest.cc
        Line 62, Patchset 19: SyntheticSmoothScrollGestureParams params;
        params.gesture_source_type = source;
        params.anchor = gfx::PointF(point);
        params.distances.push_back(-distance);
        params.granularity = ui::ScrollGranularity::kScrollByPrecisePixel;

        auto gesture = std::make_unique<SyntheticSmoothScrollGesture>(params);

        // Runs until we get the SyntheticGestureCompleted callback
        base::RunLoop run_loop;
        GetRenderWidgetHostImpl()->QueueSyntheticGesture(
        std::move(gesture),
        base::BindLambdaForTesting([&](SyntheticGesture::Result result) {
        EXPECT_EQ(SyntheticGesture::GESTURE_FINISHED, result);
        run_loop.Quit();
        }));
        run_loop.Run();
        Stephen Nusko . unresolved

        Okay getting back to this,

        I think we can create a DoScroll function that is a bit more elaborate but then allows us to make it take a timestamp and a delta. Then we can generate a jank 100%

        ```
        Position start = <position>
        Event1 = std::pair<std::time, delta>{base::time::now(), -5}
        Event2 = std::pair<std::time, delta>{event1.first + base::Milliseconds(5), -5}

        DoScroll(start, {event1, event2});


        DoScroll(Position start, vector<...> events) {
        auto controller =
        std::make_unique<SyntheticGestureController>(
        GetRenderWidgetHostImpl(),
        GetRenderWidgetHostImpl()->GetView()->CreateSyntheticGestureTarget(),
        SequencedTaskRunner::GetCurrentDefault());
        for (each event) {
        // construct a gesture
        controler->QueueSyntheticGesture(std::move(current_gesture), gesture_callback);
        }
        for (each event) {
        DispatchNextEvent(event.first) // fire it with a inserted timestamp)
        wait_on_gesture_callback // Or GiveItSomeTime();
        }

        }
        ```

        Since we wait in the last for loop the event time will be in the past but we'll be after the presentation representing a jank.

        Line 177, Patchset 19: EXPECT_GE(ConvertToHistogramValue(scroll_metrics[2]), 0);
        EXPECT_LE(ConvertToHistogramValue(scroll_metrics[2]), 1);
        Stephen Nusko . unresolved

        Lets introduce a jank here so we can go EXPECT_GE 1 and that way this test ensures we're tracking something.

        I'll do some code diving but I think we can create a synthetic Gesture Controller ourselves and then inject explicitly the timestamps to ensure we hit a jank.

        I talked a bit offline with you, but will also try to get you some code links tomorrow.

        Stephen Nusko

        Okay getting back to this,

        I think we can create a DoScroll function that is a bit more elaborate but then allows us to make it take a timestamp and a delta. Then we can generate a jank 100%

        ```
        Position start = <position>
        Event1 = std::pair<std::time, delta>{base::time::now(), -5}
        Event2 = std::pair<std::time, delta>{base::time::now(), -5}

        DoScroll(start, {event1, event2});


        DoScroll(Position start, vector<...> events) {
        auto controller =
        std::make_unique<SyntheticGestureController>(
        GetRenderWidgetHostImpl(),
        GetRenderWidgetHostImpl()->GetView()->CreateSyntheticGestureTarget(),
        SequencedTaskRunner::GetCurrentDefault());

        }
        ```
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Harkiran Bolaria
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
        Gerrit-Change-Number: 5385901
        Gerrit-PatchSet: 21
        Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
        Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
        Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
        Gerrit-CC: Alexander Timin <alt...@chromium.org>
        Gerrit-Attention: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Comment-Date: Tue, 07 May 2024 09:55:26 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Stephen Nusko <nus...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Stephen Nusko (Gerrit)

        unread,
        May 10, 2024, 6:33:44 AMMay 10
        to Harkiran Bolaria, Code Review Nudger, Jonathan Ross, Alexander Timin, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
        Attention needed from Harkiran Bolaria

        Stephen Nusko added 1 comment

        File cc/metrics/scroll_jank_ukm_reporter.cc
        Line 85, Patchset 22 (Latest): final_frame_presentation_timestamp_ = latest_timestamp;
        Stephen Nusko . unresolved

        This is only used in the WriteScrollTraceEvent method, Could we just pass in latest_timestamp to WriteScrollTraceEvent here in this method?

        Or pass it to EmitPredictorJankUkm and then even the test can give the final presentation timestamp.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Harkiran Bolaria
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
        Gerrit-Change-Number: 5385901
        Gerrit-PatchSet: 22
        Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
        Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
        Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
        Gerrit-CC: Alexander Timin <alt...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-Attention: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Comment-Date: Fri, 10 May 2024 10:33:35 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Harkiran Bolaria (Gerrit)

        unread,
        May 20, 2024, 11:47:10 AMMay 20
        to Code Review Nudger, Jonathan Ross, Alexander Timin, Stephen Nusko, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com

        Harkiran Bolaria added 3 comments

        Patchset-level comments
        File-level comment, Patchset 22:
        Harkiran Bolaria . resolved

        Partially addressed comments, will run tests against bots to see if changes to browser test fully work; will address remaining comments shortly

        File content/browser/renderer_host/input/scroll_tracing_browsertest.cc
        Harkiran Bolaria

        I have updated the implementation such that a jank is always present, and updated the checks accordingly. For some additional context on the current implementation:

        • At least 1 frame is always dropped; however on rare occasions we may have more than one. As discussed, I have retained a check, GE(1) for all fields.
        • I tried setting a field on the synthetic gesture itself to be used as the dispatch timestamp - however, due to the implementation of SyntheticGestureController and the process of dispatching events - dispatch is called more frequently (and we end up having multiple gestures in the queue being updated at with the same timestamps). Hence, I've implemented this so that our dispatch timestamp is on the order of inputs dispatch calls.
        • We need to account for bucketization of UKM values, rather than the raw trace values, as this is applied when we write to UKM.

        Will mark as resolved if this is consistent across the bots.

        Line 177, Patchset 19: EXPECT_GE(ConvertToHistogramValue(scroll_metrics[2]), 0);
        EXPECT_LE(ConvertToHistogramValue(scroll_metrics[2]), 1);
        Stephen Nusko . resolved

        Lets introduce a jank here so we can go EXPECT_GE 1 and that way this test ensures we're tracking something.

        I'll do some code diving but I think we can create a synthetic Gesture Controller ourselves and then inject explicitly the timestamps to ensure we hit a jank.

        I talked a bit offline with you, but will also try to get you some code links tomorrow.

        Stephen Nusko

        Okay getting back to this,

        I think we can create a DoScroll function that is a bit more elaborate but then allows us to make it take a timestamp and a delta. Then we can generate a jank 100%

        ```
        Position start = <position>
        Event1 = std::pair<std::time, delta>{base::time::now(), -5}
        Event2 = std::pair<std::time, delta>{base::time::now(), -5}

        DoScroll(start, {event1, event2});


        DoScroll(Position start, vector<...> events) {
        auto controller =
        std::make_unique<SyntheticGestureController>(
        GetRenderWidgetHostImpl(),
        GetRenderWidgetHostImpl()->GetView()->CreateSyntheticGestureTarget(),
        SequencedTaskRunner::GetCurrentDefault());

        }
        ```
        Harkiran Bolaria

        Done. See above comment.

        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
        Gerrit-Change-Number: 5385901
        Gerrit-PatchSet: 22
        Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
        Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
        Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
        Gerrit-CC: Alexander Timin <alt...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-Comment-Date: Mon, 20 May 2024 15:46:57 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Stephen Nusko <nus...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Harkiran Bolaria (Gerrit)

        unread,
        May 22, 2024, 6:25:40 AMMay 22
        to Code Review Nudger, Jonathan Ross, Alexander Timin, Stephen Nusko, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com

        Harkiran Bolaria added 1 comment

        File cc/metrics/scroll_jank_ukm_reporter.cc
        Line 85, Patchset 22: final_frame_presentation_timestamp_ = latest_timestamp;
        Stephen Nusko . resolved

        This is only used in the WriteScrollTraceEvent method, Could we just pass in latest_timestamp to WriteScrollTraceEvent here in this method?

        Or pass it to EmitPredictorJankUkm and then even the test can give the final presentation timestamp.

        Harkiran Bolaria

        The issue would be in the destructor of ScrollJankUkmReporter - we call WriteScrollTraceEvent from the destructor via EmitScrollJankUkm, and we wouldn't know the latest frame timestamp from here without direct access to the latest frame otherwise.

        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
        Gerrit-Change-Number: 5385901
        Gerrit-PatchSet: 23
        Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
        Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
        Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
        Gerrit-CC: Alexander Timin <alt...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-Comment-Date: Wed, 22 May 2024 10:25:28 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Harkiran Bolaria (Gerrit)

        unread,
        May 22, 2024, 6:28:34 AMMay 22
        to Code Review Nudger, Jonathan Ross, Alexander Timin, Stephen Nusko, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com

        Harkiran Bolaria added 1 comment

        File content/browser/renderer_host/input/scroll_tracing_browsertest.cc
        Harkiran Bolaria

        Updated for specific scrolling points/distances for certain architectures. Verifying against bots.

        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
        Gerrit-Change-Number: 5385901
        Gerrit-PatchSet: 24
        Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
        Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
        Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
        Gerrit-CC: Alexander Timin <alt...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-Comment-Date: Wed, 22 May 2024 10:28:24 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Harkiran Bolaria (Gerrit)

        unread,
        Jun 27, 2024, 2:02:54 PM (4 days ago) Jun 27
        to Daniel Cheng, Code Review Nudger, Jonathan Ross, Alexander Timin, Stephen Nusko, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com

        Harkiran Bolaria added 2 comments

        Patchset-level comments
        File-level comment, Patchset 37 (Latest):
        Harkiran Bolaria . resolved

        Updated testing so that we only use smoke tests, rather than full browser testing - see other resolved comment. Will add reviewers back to attention set once bots pass.

        File content/browser/renderer_host/input/scroll_tracing_browsertest.cc
        Line 62, Patchset 19: SyntheticSmoothScrollGestureParams params;
        params.gesture_source_type = source;
        params.anchor = gfx::PointF(point);
        params.distances.push_back(-distance);
        params.granularity = ui::ScrollGranularity::kScrollByPrecisePixel;

        auto gesture = std::make_unique<SyntheticSmoothScrollGesture>(params);

        // Runs until we get the SyntheticGestureCompleted callback
        base::RunLoop run_loop;
        GetRenderWidgetHostImpl()->QueueSyntheticGesture(
        std::move(gesture),
        base::BindLambdaForTesting([&](SyntheticGesture::Result result) {
        EXPECT_EQ(SyntheticGesture::GESTURE_FINISHED, result);
        run_loop.Quit();
        }));
        run_loop.Run();
        Stephen Nusko . resolved
        Harkiran Bolaria

        From offline conversation - we have opted for smoke tests here as it has been challenging to debug/replicate the failures on bots.

        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Review
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
        Gerrit-Change-Number: 5385901
        Gerrit-PatchSet: 37
        Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
        Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
        Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
        Gerrit-CC: Alexander Timin <alt...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Daniel Cheng <dch...@chromium.org>
        Gerrit-Comment-Date: Thu, 27 Jun 2024 18:02:43 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Harkiran Bolaria (Gerrit)

        unread,
        2:46 AM (9 hours ago) 2:46 AM
        to Daniel Cheng, Code Review Nudger, Jonathan Ross, Alexander Timin, Stephen Nusko, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
        Attention needed from Jonathan Ross and Stephen Nusko

        Harkiran Bolaria added 1 comment

        Patchset-level comments
        Harkiran Bolaria . resolved

        Adding reviewers back to attention set, as we've opted for smoke tests rather than full browser testing.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Jonathan Ross
        • Stephen Nusko
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Review
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
        Gerrit-Change-Number: 5385901
        Gerrit-PatchSet: 37
        Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
        Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
        Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
        Gerrit-CC: Alexander Timin <alt...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Daniel Cheng <dch...@chromium.org>
        Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
        Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
        Gerrit-Comment-Date: Mon, 01 Jul 2024 06:46:14 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Stephen Nusko (Gerrit)

        unread,
        5:30 AM (6 hours ago) 5:30 AM
        to Harkiran Bolaria, Daniel Cheng, Code Review Nudger, Jonathan Ross, Alexander Timin, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
        Attention needed from Harkiran Bolaria and Jonathan Ross

        Stephen Nusko voted and added 1 comment

        Votes added by Stephen Nusko

        Code-Review+1

        1 comment

        File content/browser/renderer_host/input/scroll_tracing_browsertest.cc
        Line 80, Patchset 37 (Latest): auto controller = std::make_unique<ScrollDelaySyntheticGestureController>(
        Stephen Nusko . unresolved

        Since we're only doing a smoke test do we need our own controller now?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Harkiran Bolaria
        • Jonathan Ross
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
        Gerrit-Change-Number: 5385901
        Gerrit-PatchSet: 37
        Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
        Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
        Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
        Gerrit-CC: Alexander Timin <alt...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Daniel Cheng <dch...@chromium.org>
        Gerrit-Attention: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
        Gerrit-Comment-Date: Mon, 01 Jul 2024 09:30:39 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Harkiran Bolaria (Gerrit)

        unread,
        6:00 AM (5 hours ago) 6:00 AM
        to Stephen Nusko, Daniel Cheng, Code Review Nudger, Jonathan Ross, Alexander Timin, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
        Attention needed from Jonathan Ross and Stephen Nusko

        Harkiran Bolaria added 1 comment

        File content/browser/renderer_host/input/scroll_tracing_browsertest.cc
        Line 80, Patchset 37: auto controller = std::make_unique<ScrollDelaySyntheticGestureController>(
        Stephen Nusko . resolved

        Since we're only doing a smoke test do we need our own controller now?

        Harkiran Bolaria

        This is correct, updated accordingly, thanks for catching.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Jonathan Ross
        • Stephen Nusko
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Review
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
        Gerrit-Change-Number: 5385901
        Gerrit-PatchSet: 38
        Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
        Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
        Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
        Gerrit-CC: Alexander Timin <alt...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Daniel Cheng <dch...@chromium.org>
        Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
        Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
        Gerrit-Comment-Date: Mon, 01 Jul 2024 10:00:41 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Stephen Nusko <nus...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Stephen Nusko (Gerrit)

        unread,
        6:17 AM (5 hours ago) 6:17 AM
        to Harkiran Bolaria, Daniel Cheng, Code Review Nudger, Jonathan Ross, Alexander Timin, Omar Elmekkawy, Tricium, AyeAye, chromium...@chromium.org, Chromium LUCI CQ, tracing...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, spang...@chromium.org, creis...@chromium.org, dtapuska+ch...@chromium.org, wfh+...@chromium.org, cc-...@chromium.org, ddrone...@google.com
        Attention needed from Harkiran Bolaria and Jonathan Ross

        Stephen Nusko voted and added 5 comments

        Votes added by Stephen Nusko

        Code-Review+1

        5 comments

        File content/browser/renderer_host/input/scroll_tracing_browsertest.cc
        Line 52, Patchset 38 (Latest): auto controller = std::make_unique<SyntheticGestureController>(
        GetRenderWidgetHostImpl(),
        GetRenderWidgetHostImpl()->GetView()->CreateSyntheticGestureTarget(),
        base::SequencedTaskRunner::GetCurrentDefault());
        Stephen Nusko . unresolved

        Do we need this controller at all?

        [GetRenderWidgetHostImpl()->QueueSyntheticGesture](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/render_widget_host_impl.h;l=602;drc=3c0517dbb233391c728684395d9aebb099665a09) creates a GestureController as needed.

        Line 64, Patchset 38 (Latest): // params.speed_in_pixels_s = 2;
        // params.input_event_pattern =
        // content::mojom::InputEventPattern::kEveryOtherVsync;
        Stephen Nusko . unresolved

        Either remove or leave a comment mentioning these params in a TODO of some sort.

        Line 117, Patchset 38 (Latest):// NOTE: Mac doesn't support touch events, and will not record scrolls with
        Stephen Nusko . unresolved

        comment says mac, but build flag says only android. Perhaps change the comment to state

        Line 132, Patchset 38 (Latest):
        // Scroll with 3 updates to ensure:
        // 1) One frame is missed (maximum 2 may be missed).
        // 2) Predictor jank occurs.
        #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM64)
        DoScroll(gfx::Point(10, 10), {gfx::Vector2d(0, 100), gfx::Vector2d(0, -100)},
        content::mojom::GestureSourceType::kTouchInput);
        #else
        DoScroll(gfx::Point(0, 10), {gfx::Vector2d(0, 15), gfx::Vector2d(0, -10)},
        content::mojom::GestureSourceType::kTouchInput);
        #endif
        Stephen Nusko . unresolved

        Do we need this build config check if we're not trying to address the flakiness of the bots?

        Line 178, Patchset 38 (Latest): // frame_count
        EXPECT_GE(ConvertToHistogramValue(scroll_metrics[0]), 0);
        // vsync_count
        EXPECT_GE(ConvertToHistogramValue(scroll_metrics[1]), 0);

        // missed_vsync_max
        EXPECT_GE(ConvertToHistogramValue(scroll_metrics[2]), 0);
        // missed_vsync_sum
        EXPECT_GE(ConvertToHistogramValue(scroll_metrics[3]), 0);
        // delayed_frame_count
        EXPECT_GE(ConvertToHistogramValue(scroll_metrics[4]), 0);
        // predictor_janky_frame_count.
        EXPECT_GE(ConvertToHistogramValue(scroll_metrics[5]), 0);
        Stephen Nusko . unresolved

        Anything GE to zero doesn't make sense to check (it fails or passes in all cases).

        however Frame_cout and vsync_count should always be >= 1 right?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Harkiran Bolaria
        • Jonathan Ross
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Id79affb21e58a50e598e74cd01fd3dfe8b67e454
        Gerrit-Change-Number: 5385901
        Gerrit-PatchSet: 38
        Gerrit-Owner: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
        Gerrit-Reviewer: Omar Elmekkawy <me...@chromium.org>
        Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
        Gerrit-CC: Alexander Timin <alt...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-CC: Daniel Cheng <dch...@chromium.org>
        Gerrit-Attention: Harkiran Bolaria <hbol...@google.com>
        Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
        Gerrit-Comment-Date: Mon, 01 Jul 2024 10:17:12 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages