• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2023 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14"""Contains tables for relevant for TODO."""
15
16from python.generators.trace_processor_table.public import Column as C
17from python.generators.trace_processor_table.public import CppDouble
18from python.generators.trace_processor_table.public import ColumnFlag
19from python.generators.trace_processor_table.public import CppInt64
20from python.generators.trace_processor_table.public import CppOptional
21from python.generators.trace_processor_table.public import Table
22from python.generators.trace_processor_table.public import TableDoc
23from python.generators.trace_processor_table.public import CppTableId
24from python.generators.trace_processor_table.public import CppUint32
25
26from src.trace_processor.tables.track_tables import COUNTER_TRACK_TABLE
27
28COUNTER_TABLE = Table(
29    python_module=__file__,
30    class_name='CounterTable',
31    sql_name='counter',
32    columns=[
33        C('ts', CppInt64(), flags=ColumnFlag.SORTED),
34        C('track_id', CppTableId(COUNTER_TRACK_TABLE)),
35        C('value', CppDouble()),
36        C('arg_set_id', CppOptional(CppUint32())),
37    ],
38    tabledoc=TableDoc(
39        doc='''''',
40        group='Events',
41        columns={
42            'ts': '''''',
43            'track_id': '''''',
44            'value': '''''',
45            'arg_set_id': '''''',
46        }))
47
48# Keep this list sorted.
49ALL_TABLES = [
50    COUNTER_TABLE,
51]
52