xref: /aosp_15_r20/external/perfetto/src/trace_processor/db/BUILD.gn (revision 6dbdd20afdafa5e3ca9b8809fa73465d530080dc)
1# Copyright (C) 2019 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
15import("../../../gn/perfetto_tp_tables.gni")
16import("../../../gn/test.gni")
17
18source_set("minimal") {
19  sources = [
20    "base_id.h",
21    "column.cc",
22    "column.h",
23    "column_storage.cc",
24    "column_storage.h",
25    "column_storage_overlay.h",
26    "compare.h",
27    "query_executor.cc",
28    "query_executor.h",
29    "table.cc",
30    "table.h",
31    "typed_column.h",
32    "typed_column_internal.h",
33  ]
34  deps = [
35    "../../../gn:default_deps",
36    "../../../include/perfetto/trace_processor",
37    "../../base",
38    "../containers",
39    "../util:glob",
40    "../util:regex",
41    "../util:util",
42    "column",
43  ]
44}
45
46source_set("db") {
47  sources = [
48    "runtime_table.cc",
49    "runtime_table.h",
50  ]
51  deps = [
52    "../../../gn:default_deps",
53    "../../../include/perfetto/trace_processor",
54    "../../base",
55    "../containers",
56    "column",
57  ]
58  public_deps = [ ":minimal" ]
59}
60
61source_set("compare") {
62  sources = [ "compare.h" ]
63  deps = [
64    "../../../include/perfetto/trace_processor",
65    "../containers",
66  ]
67}
68
69perfetto_unittest_source_set("unittests") {
70  testonly = true
71  sources = [
72    "compare_unittest.cc",
73    "query_executor_unittest.cc",
74    "runtime_table_unittest.cc",
75  ]
76  deps = [
77    ":db",
78    "../../../gn:default_deps",
79    "../../../gn:gtest_and_gmock",
80    "../../../include/perfetto/trace_processor:basic_types",
81    "../../base",
82    "../../base:test_support",
83    "../containers",
84    "../tables",
85    "column",
86    "column:fake_storage",
87  ]
88}
89
90if (enable_perfetto_benchmarks) {
91  source_set("benchmarks") {
92    testonly = true
93    deps = [
94      ":db",
95      "../../../gn:benchmark",
96      "../../../gn:default_deps",
97      "../../../include/perfetto/base",
98      "../../../include/perfetto/ext/base",
99      "../../../include/perfetto/trace_processor:basic_types",
100      "../../base:test_support",
101      "../containers",
102      "../tables:tables_python",
103      "column",
104    ]
105    sources = [ "query_executor_benchmark.cc" ]
106  }
107}
108