-
Notifications
You must be signed in to change notification settings - Fork 869
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add brave metrics to system_health.common_*
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (c) 2023 The Brave Authors. All rights reserved. | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
# You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
import override_utils | ||
|
||
|
||
def _add_brave_metrics(options): | ||
options.ExtendTimelineBasedMetric(['braveNavigationMetric']) | ||
return options | ||
|
||
|
||
@override_utils.override_method(MobileCommonSystemHealth) | ||
def CreateCoreTimelineBasedMeasurementOptions(self, original_method): | ||
return _add_brave_metrics(original_method(self)) | ||
|
||
|
||
@override_utils.override_method(DesktopCommonSystemHealth) | ||
def CreateCoreTimelineBasedMeasurementOptions(self, original_method): | ||
return _add_brave_metrics(original_method(self)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
diff --git a/tools/perf/benchmarks/system_health.py b/tools/perf/benchmarks/system_health.py | ||
index b5d11fb82029d5db007b18d72da03d4bcd357de0..9fd46d179a95c8cd6982da0006fe41b4933802ee 100644 | ||
--- a/tools/perf/benchmarks/system_health.py | ||
+++ b/tools/perf/benchmarks/system_health.py | ||
@@ -261,3 +261,4 @@ class WebviewStartupSystemHealthBenchmark(perf_benchmark.PerfBenchmark): | ||
@classmethod | ||
def Name(cls): | ||
return 'system_health.webview_startup' | ||
+from import_inline import inline_file_from_src; inline_file_from_src("brave/chromium_src/tools/perf/benchmarks/system_health.py", globals(), locals()) |