• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2018 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.gni")
16import("../../../gn/perfetto_cc_proto_descriptor.gni")
17import("../../../gn/test.gni")
18
19perfetto_cc_proto_descriptor("gen_cc_metrics_descriptor") {
20  descriptor_name = "metrics.descriptor"
21  descriptor_target = "../../../protos/perfetto/metrics:descriptor"
22}
23
24perfetto_cc_proto_descriptor("gen_cc_all_chrome_metrics_descriptor") {
25  descriptor_name = "all_chrome_metrics.descriptor"
26  descriptor_target = "../../../protos/perfetto/metrics/chrome:descriptor"
27}
28
29if (enable_perfetto_trace_processor_sqlite) {
30  source_set("metrics") {
31    sources = [
32      "metrics.cc",
33      "metrics.h",
34    ]
35    deps = [
36      "..:metatrace",
37      "../../../gn:default_deps",
38      "../../../gn:sqlite",
39      "../../../include/perfetto/trace_processor",
40      "../../../protos/perfetto/common:zero",
41      "../../../protos/perfetto/trace_processor:metrics_impl_zero",
42      "../../base",
43      "../../protozero:protozero",
44      "../sqlite",
45    ]
46    public_deps = [
47      ":gen_cc_all_chrome_metrics_descriptor",
48      ":gen_cc_metrics_descriptor",
49      "../util",
50      "../util:descriptors",
51      "sql:gen_amalgamated_sql_metrics",
52    ]
53  }
54
55  perfetto_unittest_source_set("unittests") {
56    testonly = true
57    sources = [ "metrics_unittest.cc" ]
58    deps = [
59      ":metrics",
60      "..:lib",
61      "../../../gn:default_deps",
62      "../../../gn:gtest_and_gmock",
63      "../../../gn:sqlite",
64      "../../../protos/perfetto/common:zero",
65    ]
66  }
67}
68