Primiano Tucci | 3b72910 | 2018-01-08 18:16:36 +0000 | [diff] [blame] | 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 | |
Hector Dearman | 86cfbe1 | 2018-03-22 11:58:42 +0000 | [diff] [blame] | 15 | import("../../gn/perfetto.gni") |
| 16 | import("../../gn/proto_library.gni") |
| 17 | |
Primiano Tucci | 3b72910 | 2018-01-08 18:16:36 +0000 | [diff] [blame] | 18 | source_set("perfetto_cmd") { |
| 19 | public_deps = [ |
Hector Dearman | 86cfbe1 | 2018-03-22 11:58:42 +0000 | [diff] [blame] | 20 | ":protos", |
Hector Dearman | c443a36 | 2018-02-28 16:03:56 +0000 | [diff] [blame] | 21 | "../../include/perfetto/traced", |
Primiano Tucci | 3b72910 | 2018-01-08 18:16:36 +0000 | [diff] [blame] | 22 | ] |
| 23 | deps = [ |
Hector Dearman | c443a36 | 2018-02-28 16:03:56 +0000 | [diff] [blame] | 24 | "../../gn:default_deps", |
| 25 | "../../protos/perfetto/config", |
| 26 | "../base", |
| 27 | "../protozero", |
| 28 | "../tracing:ipc_consumer", |
Primiano Tucci | 3b72910 | 2018-01-08 18:16:36 +0000 | [diff] [blame] | 29 | ] |
| 30 | sources = [ |
| 31 | "perfetto_cmd.cc", |
Hector Dearman | 86cfbe1 | 2018-03-22 11:58:42 +0000 | [diff] [blame] | 32 | "perfetto_cmd.h", |
| 33 | "rate_limiter.cc", |
| 34 | "rate_limiter.h", |
| 35 | ] |
| 36 | } |
| 37 | |
| 38 | proto_library("protos") { |
| 39 | generate_python = false |
| 40 | deps = [] |
| 41 | sources = [ |
| 42 | "perfetto_cmd_state.proto", |
| 43 | ] |
| 44 | proto_in_dir = perfetto_root_path |
| 45 | proto_out_dir = perfetto_root_path |
| 46 | } |
| 47 | |
| 48 | source_set("unittests") { |
| 49 | testonly = true |
| 50 | public_deps = [] |
| 51 | deps = [ |
| 52 | ":perfetto_cmd", |
| 53 | "../../gn:default_deps", |
| 54 | "../../gn:gtest_deps", |
| 55 | ] |
| 56 | sources = [ |
| 57 | "rate_limiter_unittest.cc", |
Primiano Tucci | 3b72910 | 2018-01-08 18:16:36 +0000 | [diff] [blame] | 58 | ] |
| 59 | } |