Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[fuchsia] set vsync_offset based on config file #18006

Merged
merged 13 commits into from
May 1, 2020

Conversation

farchond
Copy link
Contributor

In order to better support different products on Fuchsia, we should
change performance-sensitive attributes based on config files passed in.
This change does so for vsync_offset. If the file does not exist, or we cannot
successfully parse it, there is no change in behavior.

In order to better support different products on Fuchsia, we should
change performance-sensitive attributes based on config files passed in.
This change does so for `vsync_offset`.
@farchond farchond requested review from iskakaushik and arbreng April 28, 2020 17:36
@auto-assign auto-assign bot requested a review from GaryQian April 28, 2020 17:37
@farchond farchond requested a review from iskakaushik April 30, 2020 18:46
Copy link
Contributor

@iskakaushik iskakaushik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall left a couple of comments regarding names, style and additional tests.


class ProductConfigurationTest : public testing::Test {};

TEST_F(ProductConfigurationTest, ValidVsyncOffset) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add the following tests:

  1. Invalid json string.
  2. Negative vsync offset.
  3. Unexpected vsync offset (larger than 1 second for example deserves a warning).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

#include "vsync_recorder.h"

namespace flutter_runner {

VsyncWaiter::VsyncWaiter(std::string debug_label,
zx_handle_t session_present_handle,
flutter::TaskRunners task_runners)
flutter::TaskRunners task_runners,
ProductConfiguration product_config)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would take a float/double in this constructor. Its generally a good dependency injection practice for consumers of a configuration to take specific parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, but why a floating point number and not an integer/fml::TimeDelta?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it to take an fml::TimeDelta since that's the type of vsync_offset_

Copy link
Contributor

@arbreng arbreng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after kaushiks comments are addressed

@farchond farchond requested a review from iskakaushik April 30, 2020 21:21
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 1, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 1, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 1, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 1, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 2, 2020
@liyuqian liyuqian added the severe: performance Relates to speed or footprint issues. label May 5, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes severe: performance Relates to speed or footprint issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants