Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabled Performance features by default #17290

Merged
merged 1 commit into from
Feb 25, 2023

Conversation

simonhong
Copy link
Member

@simonhong simonhong commented Feb 20, 2023

fix brave/brave-browser#28615

Settings with device w/o battery
Screenshot 2023-02-22 at 1 54 45 PM

Settings with device with battery
Screenshot 2023-02-22 at 1 57 21 PM
When energy saver is on, toolbar has this button
스크린샷 2023-02-22 오후 2 22 22

Resolves

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run lint, npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

BraveMainDelegateBrowserTest.EnabledFeatures
See the linked issue for manual testing

@simonhong simonhong self-assigned this Feb 20, 2023
@github-actions github-actions bot added CI/run-network-audit Run network-audit CI/storybook-url Deploy storybook and provide a unique URL for each build labels Feb 20, 2023
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@simonhong simonhong force-pushed the enable_kHighEfficiencyModeAvailable_desktop branch from 78e87d1 to c47edf7 Compare February 21, 2023 02:17
@simonhong simonhong changed the title Enabled kHighEfficiencyModeAvailable feature by default Enabled Performance features by default Feb 22, 2023
@simonhong simonhong force-pushed the enable_kHighEfficiencyModeAvailable_desktop branch 2 times, most recently from 4d692eb to 33467cc Compare February 22, 2023 05:42
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@simonhong simonhong marked this pull request as ready for review February 22, 2023 06:29
@simonhong simonhong requested a review from a team as a code owner February 22, 2023 06:29
@simonhong simonhong force-pushed the enable_kHighEfficiencyModeAvailable_desktop branch from 33467cc to aae4ead Compare February 22, 2023 06:31
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@simonhong simonhong force-pushed the enable_kHighEfficiencyModeAvailable_desktop branch 2 times, most recently from 446a299 to 3a64c47 Compare February 22, 2023 08:23
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@simonhong
Copy link
Member Author

There are some upstream test failures when performance features are enabled by default.
All of them are failed at the below point. Maybe code flow is changed with enabled features.
@goodov In this case, should we disable failed tests?

[2023-02-22T08:35:33.052Z] [104893:104893:FATAL:page_discarding_helper.cc(395)] Check failed: it != profiles_no_discard_patterns_.end(). 
[2023-02-22T08:35:33.052Z] #0 0x558b8df860e2 base::debug::CollectStackTrace()
[2023-02-22T08:35:33.052Z] #1 0x558b8de706c3 base::debug::StackTrace::StackTrace()
[2023-02-22T08:35:33.052Z] #2 0x558b8de8c46f logging::LogMessage::~LogMessage()
[2023-02-22T08:35:33.052Z] #3 0x558b8de8d2ee logging::LogMessage::~LogMessage()
[2023-02-22T08:35:33.052Z] #4 0x558b8e92690f performance_manager::policies::PageDiscardingHelper::IsPageOptedOutOfDiscarding()
[2023-02-22T08:35:33.052Z] #5 0x558b8e925fe8 performance_manager::policies::PageDiscardingHelper::CanUrgentlyDiscard()
[2023-02-22T08:35:33.052Z] #6 0x558b85d9af7a performance_manager::testing::MakePageNodeDiscardable()
[2023-02-22T08:35:33.052Z] #7 0x558b85d9ac9e performance_manager::testing::GraphTestHarnessWithMockDiscarder::SetUp()
[2023-02-22T08:35:33.052Z] #8 0x558b86434299 performance_manager::policies::HighEfficiencyModeTest::SetUp()
[2023-02-22T08:35:33.052Z] #9 0x558b88086da2 testing::Test::Run()
[2023-02-22T08:35:28.206Z] [104578:104578:FATAL:user_performance_tuning_manager.cc(98)] Check failed: g_user_performance_tuning_manager. 
[2023-02-22T08:35:28.206Z] #0 0x5638d251f0e2 base::debug::CollectStackTrace()
[2023-02-22T08:35:28.206Z] #1 0x5638d24096c3 base::debug::StackTrace::StackTrace()
[2023-02-22T08:35:28.206Z] #2 0x5638d242546f logging::LogMessage::~LogMessage(
[2023-02-22T08:35:28.206Z] #3 0x5638d24262ee logging::LogMessage::~LogMessage()
[2023-02-22T08:35:28.206Z] #4 0x5638d2ec4b80 performance_manager::user_tuning::UserPerformanceTuningManager::GetInstance()
[2023-02-22T08:35:28.206Z] #5 0x5638d2ba7489 performance_manager::user_tuning::IsRefreshRateThrottled()
[2023-02-22T08:35:28.206Z] #6 0x5638d2b70a27 UkmPageLoadMetricsObserver::OnStart()
[2023-02-22T08:35:28.206Z] #7 0x5638cbcbf8ff page_load_metrics::PageLoadTracker::InvokeAndPruneObservers()
[2023-02-22T08:35:28.206Z] #8 0x5638cbcbf69f page_load_metrics::PageLoadTracker::PageLoadTracker()
[2023-02-22T08:35:28.206Z] #9 0x5638cbca0eb5 page_load_metrics::MetricsWebContentsObserver::WillStartNavigationRequestImpl()
[2023-02-22T08:35:28.206Z] #10 0x5638cbca0c08 page_load_metrics::MetricsWebContentsObserver::WillStartNavigationRequest()
[2023-02-22T08:35:28.206Z] #11 0x5638cbc9f4be page_load_metrics::MetricsNavigationThrottle::WillStartRequest()

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@bsclifton
Copy link
Member

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@simonhong simonhong force-pushed the enable_kHighEfficiencyModeAvailable_desktop branch from 2f3638a to 47e7f95 Compare February 23, 2023 03:10
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@simonhong simonhong force-pushed the enable_kHighEfficiencyModeAvailable_desktop branch from 47e7f95 to d8248bd Compare February 23, 2023 04:14
@rebron
Copy link
Collaborator

rebron commented Feb 23, 2023

Clicking Learn more goes to https://support.brave.com/hc/en-us which is a bit weird

Chrome will send you here: https://support.google.com/chrome/answer/12929150?visit_id=638126938240893485-1502329289&p=chrome_memory_saver&rd=1#memory_saver&zippy=%2Cturn-memory-saver-on-or-off

image

How should we handle this @rebron?

We need a different url and stub article for this. @Brave-Matt Can you provide a placeholder url for @simonhong

@simonhong
Copy link
Member Author

simonhong commented Feb 23, 2023

Clicking Learn more goes to https://support.brave.com/hc/en-us which is a bit weird
Chrome will send you here: https://support.google.com/chrome/answer/12929150?visit_id=638126938240893485-1502329289&p=chrome_memory_saver&rd=1#memory_saver&zippy=%2Cturn-memory-saver-on-or-off
image
How should we handle this @rebron?

We need a different url and stub article for this. @Brave-Matt Can you provide a placeholder url for @simonhong

We need two learn more urls for memory & battery saver
Chrome's battery saver learn more url - https://support.google.com/chrome/?p=chrome_battery_saver
Chrome's memory saver learn more url - https://support.google.com/chrome/?p=chrome_memory_saver

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

Changes LGTM; I'd defer to @brave/chromium-src-reviewers on how we'd want to tackle the tests. I think we can exclude them? Thanks for digging in and finding they are failing because of the default value

@simonhong
Copy link
Member Author

Changes LGTM; I'd defer to @brave/chromium-src-reviewers on how we'd want to tackle the tests. I think we can exclude them? Thanks for digging in and finding they are failing because of the default value

d8248bd
I found that we have a filter list for it :)

@Brave-Matt
Copy link

Brave-Matt commented Feb 24, 2023

I've got a stub article you can link to here:
Battery saver: https://support.brave.com/hc/en-us/articles/13380606172557
Memory saver: https://support.brave.com/hc/en-us/articles/13383683902733

@simonhong
Copy link
Member Author

I've got a stub article you can link to here: Battery saver: https://support.brave.com/hc/en-us/articles/13380606172557 Memory saver: https://support.brave.com/hc/en-us/articles/13383683902733

@Brave-Matt It looks like these urls are internal only? I also can't load it

@Brave-Matt
Copy link

I've got a stub article you can link to here: Battery saver: https://support.brave.com/hc/en-us/articles/13380606172557 Memory saver: https://support.brave.com/hc/en-us/articles/13383683902733

@Brave-Matt It looks like these urls are internal only? I also can't load it

Yes these are stub articles (not content yet — will start this tomorrow) but those links will work once I push live

@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@simonhong simonhong force-pushed the enable_kHighEfficiencyModeAvailable_desktop branch from 544766a to 80c240a Compare February 24, 2023 14:51
fix brave/brave-browser#28615

* kBatterySaverModeAvailable
* kHighEfficiencyModeAvailable

Deleted brave://settings/performance route.
brave://settings/system page has performance section.
Battery setting is only visible when device has battery.
@simonhong simonhong force-pushed the enable_kHighEfficiencyModeAvailable_desktop branch from 80c240a to aab42bd Compare February 24, 2023 15:03
@brave-builds
Copy link
Collaborator

A Storybook has been deployed to preview UI for the latest push

@simonhong simonhong merged commit 30b403d into master Feb 25, 2023
@simonhong simonhong deleted the enable_kHighEfficiencyModeAvailable_desktop branch February 25, 2023 00:33
@github-actions github-actions bot added this to the 1.50.x - Nightly milestone Feb 25, 2023
@simonhong
Copy link
Member Author

simonhong commented Mar 8, 2023

I've got a stub article you can link to here: Battery saver: https://support.brave.com/hc/en-us/articles/13380606172557 Memory saver: https://support.brave.com/hc/en-us/articles/13383683902733

@Brave-Matt It looks like these urls are internal only? I also can't load it

Yes these are stub articles (not content yet — will start this tomorrow) but those links will work once I push live

@Brave-Matt Both urls are public and they are in mobile/android category.
but they're for desktop. Let me know if we need to change their urls.
Screenshot 2023-03-08 at 2 42 53 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/run-network-audit Run network-audit CI/storybook-url Deploy storybook and provide a unique URL for each build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Power section to System in Settings UI
6 participants