• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2-- Copyright 2024 The Android Open Source Project
3--
4-- Licensed under the Apache License, Version 2.0 (the "License");
5-- you may not use this file except in compliance with the License.
6-- You may obtain a copy of the License at
7--
8--     https://www.apache.org/licenses/LICENSE-2.0
9--
10-- Unless required by applicable law or agreed to in writing, software
11-- distributed under the License is distributed on an "AS IS" BASIS,
12-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-- See the License for the specific language governing permissions and
14-- limitations under the License.
15
16INCLUDE PERFETTO MODULE android.startup.startups;
17
18DROP VIEW IF EXISTS _app_startup_window;
19CREATE PERFETTO VIEW _app_startup_window AS
20SELECT
21  ts,
22  dur,
23  startup_id as period_id
24FROM android_startups;
25
26SELECT RUN_METRIC(
27  'android/wattson_rail_relations.sql',
28  'window_table', '_app_startup_window'
29);
30
31DROP VIEW IF EXISTS wattson_app_startup_rails_output;
32CREATE PERFETTO VIEW wattson_app_startup_rails_output AS
33SELECT AndroidWattsonTimePeriodMetric(
34  'metric_version', 4,
35  'power_model_version', 1,
36  'period_info', (
37    SELECT RepeatedField(
38      AndroidWattsonEstimateInfo(
39        'period_id', period_id,
40        'period_dur', period_dur,
41        'cpu_subsystem', proto
42      )
43    )
44    FROM _estimate_cpu_subsystem_sum
45  )
46);
47