Skip to content

Provide FrameTiming flush mechanism #64808

Closed

Description

@liyuqian

Currently, multiple FrameTimings are batched by the engine so it's hard for the framework to precisely control when to start and stop FrameTiming monitoring. That could make the benchmark either count some old frames before the profiling that it shouldn't count, or miss some frames in the end of profiling. (#64780 is a workaround to mitigate this.)

We should add an API to let the framework instruct the engine to reliably flush all pending FrameTimings to solve this issue.

Activity

  1. added
    c: contributor-productivityTeam-specific productivity, code health, technical debt.
    c: performanceRelates to speed or footprint issues (see "perf:" labels)
    on Aug 28, 2020
  2. added
    engineflutter/engine related. See also e: labels.
    on Aug 31, 2020
  3. chinmaygarde commented on Aug 31, 2020

    @chinmaygarde
    Contributor

    It seem like the ask here is to discard old traces before starting collection anew. If this is possible at all (AFAIK, there are thread specific trace buffers and there may not be a way to clear all of them at a specific time), we will need a Dart VM API to do this. The timeline mechanism may not tool for getting real time trace information from the VM. CC @rmacnak-google for thoughts on this.

  4. added
    P1High-priority issues at the top of the work list
    on Aug 31, 2020
  5. chinmaygarde commented on Aug 31, 2020

    @chinmaygarde
    Contributor

    Elevating priority on this as fixing this should go a long way towards making benchmarks less flaky.

  6. liyuqian commented on Aug 31, 2020

    @liyuqian
    ContributorAuthor

    The batching here doesn't involve Dart VM Timeline so I hope it can be done just in the engine.

  7. rmacnak-google commented on Aug 31, 2020

    @rmacnak-google
    Contributor

    If the VM is configured to buffer the timeline events itself instead of forwarding them to the system tracer, it is possible to clear this buffer with clearVMTimeline. This should include thread-local buffers.

    Though if a benchmark wants to compute its score by examining the timeline, I would recommend emitting events that show the scope of the benchmark and filtering based on the timestamps of those events rather than clearing the timeline itself. Clearing would remove context useful when someone manually investigates the benchmark, and clearing only works for discarding events that are too early and not for events that are too late.

  8. removed
    P1High-priority issues at the top of the work list
    on Jan 11, 2021
  9. kf6gpe commented on Jan 11, 2021

    @kf6gpe
    Contributor

    As this is a new feature request, reprioritizing to reflect our current triage priorities.

  10. added
    P3Issues that are less important to the Flutter project
    on Jan 11, 2021
  11. added and removed
    P3Issues that are less important to the Flutter project
    on Oct 9, 2021
  12. 3 remaining items

  13. flutter-triage-bot commented on Jul 8, 2023

    @flutter-triage-bot

    This issue is assigned but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

  14. added
    ⏳Bot is counting down the days until it unassigns the issue
    on Dec 4, 2023
  15. flutter-triage-bot commented on Dec 4, 2023

    @flutter-triage-bot

    This issue is assigned to @iskakaushik but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

  16. flutter-triage-bot commented on Feb 8, 2024

    @flutter-triage-bot

    This issue was assigned to @iskakaushik but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.

  17. removed
    ⏳Bot is counting down the days until it unassigns the issue
    on Feb 8, 2024
  18. jonahwilliams commented on Feb 12, 2024

    @jonahwilliams
    Contributor

    We don't need to do this.

  19. github-actions commented on Feb 26, 2024

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  20. locked as resolved and limited conversation to collaborators on Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: contributor-productivityTeam-specific productivity, code health, technical debt.c: new featureNothing broken; request for a new capabilityc: performanceRelates to speed or footprint issues (see "perf:" labels)customer: googleVarious Google teamsengineflutter/engine related. See also e: labels.team-engineOwned by Engine team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions