• 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--
16
17CREATE PERFETTO FUNCTION _counter_track_is_only_name_dimension(
18    track_id LONG
19)
20RETURNS BOOL AS
21SELECT
22  NOT EXISTS(
23    SELECT
24      1
25    FROM counter_track
26    JOIN args
27      ON counter_track.dimension_arg_set_id = args.arg_set_id
28    WHERE
29      counter_track.id = $track_id AND args.key != 'name'
30    LIMIT 1
31  );
32