Yao Chen | f25e657 | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1 | // |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 2 | // Copyright (C) 2017 The Android Open Source Project |
Yao Chen | f25e657 | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 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 | // http://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 | |
Bob Badour | 21c8a12 | 2021-02-03 18:34:19 -0800 | [diff] [blame] | 17 | package { |
| 18 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 19 | } |
| 20 | |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 21 | cc_defaults { |
| 22 | name: "statsd_defaults", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 23 | |
| 24 | srcs: [ |
Chenjie Yu | a8fa433 | 2019-02-04 17:25:45 -0800 | [diff] [blame] | 25 | "src/active_config_list.proto", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 26 | "src/anomaly/AlarmMonitor.cpp", |
| 27 | "src/anomaly/AlarmTracker.cpp", |
| 28 | "src/anomaly/AnomalyTracker.cpp", |
| 29 | "src/anomaly/DurationAnomalyTracker.cpp", |
| 30 | "src/anomaly/subscriber_util.cpp", |
| 31 | "src/condition/CombinationConditionTracker.cpp", |
| 32 | "src/condition/condition_util.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 33 | "src/condition/ConditionWizard.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 34 | "src/condition/SimpleConditionTracker.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 35 | "src/config/ConfigKey.cpp", |
| 36 | "src/config/ConfigListener.cpp", |
| 37 | "src/config/ConfigManager.cpp", |
Jonathan Nguyen | 11ba0b6 | 2020-01-28 18:33:55 -0800 | [diff] [blame] | 38 | "src/experiment_ids.proto", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 39 | "src/external/Perfetto.cpp", |
Tej Singh | dd57c3a | 2019-10-11 11:07:06 -0700 | [diff] [blame] | 40 | "src/external/PullResultReceiver.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 41 | "src/external/puller_util.cpp", |
Tej Singh | 5dda189 | 2019-01-25 16:39:18 -0800 | [diff] [blame] | 42 | "src/external/StatsCallbackPuller.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 43 | "src/external/StatsPuller.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 44 | "src/external/StatsPullerManager.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 45 | "src/external/TrainInfoPuller.cpp", |
| 46 | "src/FieldValue.cpp", |
Tej Singh | 01bfbbb | 2020-12-01 12:15:23 -0800 | [diff] [blame] | 47 | "src/flags/flags.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 48 | "src/guardrail/StatsdStats.cpp", |
| 49 | "src/hash.cpp", |
| 50 | "src/HashableDimensionKey.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 51 | "src/logd/LogEvent.cpp", |
Yao Chen | 1331159 | 2019-03-27 11:51:15 -0700 | [diff] [blame] | 52 | "src/logd/LogEventQueue.cpp", |
Salud Lemus | 23589d8 | 2020-08-12 00:56:58 +0000 | [diff] [blame] | 53 | "src/matchers/CombinationAtomMatchingTracker.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 54 | "src/matchers/EventMatcherWizard.cpp", |
| 55 | "src/matchers/matcher_util.cpp", |
Salud Lemus | 23589d8 | 2020-08-12 00:56:58 +0000 | [diff] [blame] | 56 | "src/matchers/SimpleAtomMatchingTracker.cpp", |
Jeffrey Huang | 3c3db95 | 2020-03-23 13:42:42 -0700 | [diff] [blame] | 57 | "src/metadata_util.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 58 | "src/metrics/CountMetricProducer.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 59 | "src/metrics/duration_helper/MaxDurationTracker.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 60 | "src/metrics/duration_helper/OringDurationTracker.cpp", |
| 61 | "src/metrics/DurationMetricProducer.cpp", |
| 62 | "src/metrics/EventMetricProducer.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 63 | "src/metrics/GaugeMetricProducer.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 64 | "src/metrics/MetricProducer.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 65 | "src/metrics/MetricsManager.cpp", |
Tej Singh | 5257a3b | 2020-07-31 23:49:39 -0700 | [diff] [blame] | 66 | "src/metrics/parsing_utils/config_update_utils.cpp", |
| 67 | "src/metrics/parsing_utils/metrics_manager_util.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 68 | "src/metrics/ValueMetricProducer.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 69 | "src/packages/UidMap.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 70 | "src/shell/shell_config.proto", |
| 71 | "src/shell/ShellSubscriber.cpp", |
| 72 | "src/socket/StatsSocketListener.cpp", |
tsaichristine | 4d6947c | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 73 | "src/state/StateManager.cpp", |
| 74 | "src/state/StateTracker.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 75 | "src/stats_log_util.cpp", |
| 76 | "src/statscompanion_util.cpp", |
| 77 | "src/statsd_config.proto", |
Jeffrey Huang | e8b2768 | 2020-03-19 15:38:43 -0700 | [diff] [blame] | 78 | "src/statsd_metadata.proto", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 79 | "src/StatsLogProcessor.cpp", |
| 80 | "src/StatsService.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 81 | "src/storage/StorageManager.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 82 | "src/subscriber/IncidentdReporter.cpp", |
| 83 | "src/subscriber/SubscriberReporter.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 84 | "src/uid_data.proto", |
Tej Singh | 8b6f11b | 2020-04-14 16:23:30 -0700 | [diff] [blame] | 85 | "src/utils/MultiConditionTrigger.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 86 | ], |
| 87 | |
| 88 | local_include_dirs: [ |
| 89 | "src", |
| 90 | ], |
| 91 | |
| 92 | static_libs: [ |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 93 | "libbase", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 94 | "libcutils", |
Tej Singh | 26d5866 | 2020-04-06 13:26:29 -0700 | [diff] [blame] | 95 | "libgtest_prod", |
Jonathan Nguyen | 6912bb1 | 2019-12-20 15:10:13 -0800 | [diff] [blame] | 96 | "libprotoutil", |
Jeffrey Huang | 7242cde | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 97 | "libstatslog_statsd", |
Jonathan Nguyen | 6912bb1 | 2019-12-20 15:10:13 -0800 | [diff] [blame] | 98 | "libsysutils", |
Howard Ro | 984540b | 2020-02-06 23:17:33 -0800 | [diff] [blame] | 99 | "libutils", |
Tej Singh | 01bfbbb | 2020-12-01 12:15:23 -0800 | [diff] [blame] | 100 | "server_configurable_flags", |
Tej Singh | 26d5866 | 2020-04-06 13:26:29 -0700 | [diff] [blame] | 101 | "statsd-aidl-ndk_platform", |
Jonathan Nguyen | 6912bb1 | 2019-12-20 15:10:13 -0800 | [diff] [blame] | 102 | ], |
| 103 | shared_libs: [ |
Ruchir Rastogi | d36dd0b | 2020-02-10 17:40:09 -0800 | [diff] [blame] | 104 | "libbinder_ndk", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 105 | "libincident", |
Howard Ro | cc91cef | 2020-02-05 18:12:14 -0800 | [diff] [blame] | 106 | "liblog", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 107 | ], |
| 108 | } |
| 109 | |
Jeffrey Huang | 7242cde | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 110 | genrule { |
| 111 | name: "statslog_statsd.h", |
| 112 | tools: ["stats-log-api-gen"], |
| 113 | cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_statsd.h --module statsd --namespace android,os,statsd,util", |
| 114 | out: [ |
| 115 | "statslog_statsd.h", |
| 116 | ], |
| 117 | } |
| 118 | |
| 119 | genrule { |
| 120 | name: "statslog_statsd.cpp", |
| 121 | tools: ["stats-log-api-gen"], |
| 122 | cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_statsd.cpp --module statsd --namespace android,os,statsd,util --importHeader statslog_statsd.h", |
| 123 | out: [ |
| 124 | "statslog_statsd.cpp", |
| 125 | ], |
| 126 | } |
| 127 | |
Jeffrey Huang | 6bfe9b4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 128 | genrule { |
| 129 | name: "statslog_statsdtest.h", |
| 130 | tools: ["stats-log-api-gen"], |
| 131 | cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_statsdtest.h --module statsdtest --namespace android,os,statsd,util", |
| 132 | out: [ |
| 133 | "statslog_statsdtest.h", |
| 134 | ], |
| 135 | } |
| 136 | |
| 137 | genrule { |
| 138 | name: "statslog_statsdtest.cpp", |
| 139 | tools: ["stats-log-api-gen"], |
| 140 | cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_statsdtest.cpp --module statsdtest --namespace android,os,statsd,util --importHeader statslog_statsdtest.h", |
| 141 | out: [ |
| 142 | "statslog_statsdtest.cpp", |
| 143 | ], |
| 144 | } |
| 145 | |
| 146 | cc_library_static { |
| 147 | name: "libstatslog_statsdtest", |
| 148 | generated_sources: ["statslog_statsdtest.cpp"], |
| 149 | generated_headers: ["statslog_statsdtest.h"], |
| 150 | export_generated_headers: ["statslog_statsdtest.h"], |
| 151 | shared_libs: [ |
| 152 | "libstatssocket", |
Salud Lemus | 307048a | 2020-07-22 19:53:44 +0000 | [diff] [blame] | 153 | "libstatspull", |
| 154 | ], |
Jeffrey Huang | 6bfe9b4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 155 | } |
| 156 | |
Jeffrey Huang | 7242cde | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 157 | cc_library_static { |
| 158 | name: "libstatslog_statsd", |
| 159 | generated_sources: ["statslog_statsd.cpp"], |
| 160 | generated_headers: ["statslog_statsd.h"], |
| 161 | export_generated_headers: ["statslog_statsd.h"], |
| 162 | apex_available: [ |
| 163 | "com.android.os.statsd", |
| 164 | "test_com.android.os.statsd", |
| 165 | ], |
| 166 | shared_libs: [ |
| 167 | "libstatssocket", |
Salud Lemus | 307048a | 2020-07-22 19:53:44 +0000 | [diff] [blame] | 168 | "libstatspull", |
| 169 | ], |
| 170 | export_shared_lib_headers: [ |
| 171 | "libstatspull", |
| 172 | ], |
Jeffrey Huang | 7242cde | 2020-03-06 15:18:33 -0800 | [diff] [blame] | 173 | } |
Muhammad Qureshi | 7108098 | 2019-11-20 17:18:03 -0800 | [diff] [blame] | 174 | |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 175 | // ========= |
| 176 | // statsd |
| 177 | // ========= |
| 178 | |
| 179 | cc_binary { |
| 180 | name: "statsd", |
| 181 | defaults: ["statsd_defaults"], |
| 182 | |
| 183 | srcs: ["src/main.cpp"], |
| 184 | |
| 185 | cflags: [ |
| 186 | "-Wall", |
| 187 | "-Wextra", |
| 188 | "-Werror", |
| 189 | "-Wno-unused-parameter", |
| 190 | // optimize for size (protobuf glop can get big) |
| 191 | "-Os", |
| 192 | // "-g", |
| 193 | // "-O0", |
| 194 | ], |
| 195 | |
| 196 | product_variables: { |
| 197 | eng: { |
| 198 | // Enable sanitizer ONLY on eng builds |
| 199 | //sanitize: { |
| 200 | // address: true, |
| 201 | //}, |
| 202 | }, |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 203 | }, |
| 204 | |
| 205 | proto: { |
| 206 | type: "lite", |
Tej Singh | 26d5866 | 2020-04-06 13:26:29 -0700 | [diff] [blame] | 207 | static: true, |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 208 | }, |
Tej Singh | 26d5866 | 2020-04-06 13:26:29 -0700 | [diff] [blame] | 209 | stl: "libc++_static", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 210 | |
Tej Singh | 05e0a41 | 2020-03-05 14:33:15 -0800 | [diff] [blame] | 211 | shared_libs: [ |
Tej Singh | 05e0a41 | 2020-03-05 14:33:15 -0800 | [diff] [blame] | 212 | "libstatssocket", |
| 213 | ], |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 214 | |
Howard Ro | e8c2056 | 2020-02-20 04:57:00 +0000 | [diff] [blame] | 215 | apex_available: [ |
| 216 | "com.android.os.statsd", |
| 217 | "test_com.android.os.statsd", |
| 218 | ], |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 219 | } |
| 220 | |
| 221 | // ============== |
| 222 | // statsd_test |
| 223 | // ============== |
| 224 | |
| 225 | cc_test { |
| 226 | name: "statsd_test", |
| 227 | defaults: ["statsd_defaults"], |
Jeffrey Huang | 8a09d03 | 2020-04-15 11:16:20 -0700 | [diff] [blame] | 228 | test_suites: ["device-tests", "mts"], |
Chen Zhu | bfd3422 | 2020-05-19 17:13:09 -0700 | [diff] [blame] | 229 | test_config: "statsd_test.xml", |
Jeffrey Huang | 8a09d03 | 2020-04-15 11:16:20 -0700 | [diff] [blame] | 230 | |
Jeffrey Huang | f5718a9 | 2020-04-17 15:33:32 -0700 | [diff] [blame] | 231 | //TODO(b/153588990): Remove when the build system properly separates |
Jeffrey Huang | 8a09d03 | 2020-04-15 11:16:20 -0700 | [diff] [blame] | 232 | //32bit and 64bit architectures. |
Jeffrey Huang | 3c6df35 | 2020-04-20 14:16:49 -0700 | [diff] [blame] | 233 | compile_multilib: "both", |
| 234 | multilib: { |
| 235 | lib64: { |
| 236 | suffix: "64", |
Chen Zhu | bfd3422 | 2020-05-19 17:13:09 -0700 | [diff] [blame] | 237 | }, |
| 238 | lib32: { |
| 239 | suffix: "32", |
| 240 | }, |
Jeffrey Huang | 3c6df35 | 2020-04-20 14:16:49 -0700 | [diff] [blame] | 241 | }, |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 242 | |
| 243 | cflags: [ |
| 244 | "-Wall", |
| 245 | "-Werror", |
| 246 | "-Wno-missing-field-initializers", |
| 247 | "-Wno-unused-variable", |
| 248 | "-Wno-unused-function", |
| 249 | "-Wno-unused-parameter", |
| 250 | ], |
| 251 | |
Tej Singh | 6ae62dd | 2019-05-21 20:13:21 -0700 | [diff] [blame] | 252 | require_root: true, |
| 253 | |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 254 | srcs: [ |
Colin Cross | 1c63475 | 2018-10-26 23:28:02 -0700 | [diff] [blame] | 255 | // atom_field_options.proto needs field_options.proto, but that is |
| 256 | // not included in libprotobuf-cpp-lite, so compile it here. |
| 257 | ":libprotobuf-internal-protos", |
Jeffrey Huang | 8678a0f | 2020-11-24 22:28:38 +0000 | [diff] [blame] | 258 | ":libstats_internal_protos", |
Colin Cross | 1c63475 | 2018-10-26 23:28:02 -0700 | [diff] [blame] | 259 | |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 260 | "src/shell/shell_data.proto", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 261 | "src/stats_log.proto", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 262 | "tests/AlarmMonitor_test.cpp", |
| 263 | "tests/anomaly/AlarmTracker_test.cpp", |
| 264 | "tests/anomaly/AnomalyTracker_test.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 265 | "tests/condition/CombinationConditionTracker_test.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 266 | "tests/condition/ConditionTimer_test.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 267 | "tests/condition/SimpleConditionTracker_test.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 268 | "tests/ConfigManager_test.cpp", |
| 269 | "tests/e2e/Alarm_e2e_test.cpp", |
| 270 | "tests/e2e/Anomaly_count_e2e_test.cpp", |
| 271 | "tests/e2e/Anomaly_duration_sum_e2e_test.cpp", |
| 272 | "tests/e2e/Attribution_e2e_test.cpp", |
| 273 | "tests/e2e/ConfigTtl_e2e_test.cpp", |
Tej Singh | 01bfbbb | 2020-12-01 12:15:23 -0800 | [diff] [blame] | 274 | "tests/e2e/ConfigUpdate_e2e_ab_test.cpp", |
Tej Singh | 77fbf3c | 2020-11-06 02:57:09 -0800 | [diff] [blame] | 275 | "tests/e2e/ConfigUpdate_e2e_test.cpp", |
tsaichristine | 416b2a4 | 2019-10-07 14:47:38 -0700 | [diff] [blame] | 276 | "tests/e2e/CountMetric_e2e_test.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 277 | "tests/e2e/DurationMetric_e2e_test.cpp", |
| 278 | "tests/e2e/GaugeMetric_e2e_pull_test.cpp", |
| 279 | "tests/e2e/GaugeMetric_e2e_push_test.cpp", |
| 280 | "tests/e2e/MetricActivation_e2e_test.cpp", |
| 281 | "tests/e2e/MetricConditionLink_e2e_test.cpp", |
| 282 | "tests/e2e/PartialBucket_e2e_test.cpp", |
| 283 | "tests/e2e/ValueMetric_pull_e2e_test.cpp", |
| 284 | "tests/e2e/WakelockDuration_e2e_test.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 285 | "tests/external/puller_util_test.cpp", |
Tej Singh | bd45df9 | 2019-12-09 16:58:08 -0800 | [diff] [blame] | 286 | "tests/external/StatsCallbackPuller_test.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 287 | "tests/external/StatsPuller_test.cpp", |
Tej Singh | 793b4e8 | 2020-03-04 20:08:38 -0800 | [diff] [blame] | 288 | "tests/external/StatsPullerManager_test.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 289 | "tests/FieldValue_test.cpp", |
| 290 | "tests/guardrail/StatsdStats_test.cpp", |
tsaichristine | 26f6a6b | 2020-01-02 12:12:05 -0800 | [diff] [blame] | 291 | "tests/HashableDimensionKey_test.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 292 | "tests/indexed_priority_queue_test.cpp", |
| 293 | "tests/log_event/LogEventQueue_test.cpp", |
| 294 | "tests/LogEntryMatcher_test.cpp", |
| 295 | "tests/LogEvent_test.cpp", |
Jeffrey Huang | dbd668a | 2020-03-30 19:52:07 -0700 | [diff] [blame] | 296 | "tests/metadata_util_test.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 297 | "tests/metrics/CountMetricProducer_test.cpp", |
| 298 | "tests/metrics/DurationMetricProducer_test.cpp", |
| 299 | "tests/metrics/EventMetricProducer_test.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 300 | "tests/metrics/GaugeMetricProducer_test.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 301 | "tests/metrics/MaxDurationTracker_test.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 302 | "tests/metrics/metrics_test_helper.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 303 | "tests/metrics/OringDurationTracker_test.cpp", |
| 304 | "tests/metrics/ValueMetricProducer_test.cpp", |
Tej Singh | 5257a3b | 2020-07-31 23:49:39 -0700 | [diff] [blame] | 305 | "tests/metrics/parsing_utils/config_update_utils_test.cpp", |
| 306 | "tests/metrics/parsing_utils/metrics_manager_util_test.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 307 | "tests/MetricsManager_test.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 308 | "tests/shell/ShellSubscriber_test.cpp", |
tsaichristine | 4d6947c | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 309 | "tests/state/StateTracker_test.cpp", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 310 | "tests/statsd_test_util.cpp", |
| 311 | "tests/StatsLogProcessor_test.cpp", |
| 312 | "tests/StatsService_test.cpp", |
| 313 | "tests/storage/StorageManager_test.cpp", |
| 314 | "tests/UidMap_test.cpp", |
Tej Singh | 8b6f11b | 2020-04-14 16:23:30 -0700 | [diff] [blame] | 315 | "tests/utils/MultiConditionTrigger_test.cpp", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 316 | ], |
| 317 | |
| 318 | static_libs: [ |
| 319 | "libgmock", |
| 320 | "libplatformprotos", |
Jeffrey Huang | 6bfe9b4 | 2020-03-17 10:31:22 -0700 | [diff] [blame] | 321 | "libstatslog_statsdtest", |
Tej Singh | 1b5bb87 | 2020-01-29 15:59:35 -0800 | [diff] [blame] | 322 | "libstatssocket_private", |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 323 | ], |
| 324 | |
| 325 | proto: { |
Colin Cross | 1c63475 | 2018-10-26 23:28:02 -0700 | [diff] [blame] | 326 | type: "lite", |
Jeffrey Huang | 8678a0f | 2020-11-24 22:28:38 +0000 | [diff] [blame] | 327 | include_dirs: [ |
| 328 | "external/protobuf/src", |
| 329 | "frameworks/proto_logging/stats", |
| 330 | ], |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 331 | }, |
| 332 | |
Colin Cross | ed86fd9 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 333 | } |
| 334 | |
| 335 | //############################# |
| 336 | // statsd micro benchmark |
| 337 | //############################# |
| 338 | |
tsaichristine | 9887f66 | 2020-03-20 17:03:49 -0700 | [diff] [blame] | 339 | cc_benchmark { |
| 340 | name: "statsd_benchmark", |
| 341 | defaults: ["statsd_defaults"], |
| 342 | |
| 343 | srcs: [ |
| 344 | // atom_field_options.proto needs field_options.proto, but that is |
| 345 | // not included in libprotobuf-cpp-lite, so compile it here. |
| 346 | ":libprotobuf-internal-protos", |
Jeffrey Huang | 8678a0f | 2020-11-24 22:28:38 +0000 | [diff] [blame] | 347 | ":libstats_internal_protos", |
tsaichristine | 9887f66 | 2020-03-20 17:03:49 -0700 | [diff] [blame] | 348 | |
| 349 | "benchmark/duration_metric_benchmark.cpp", |
| 350 | "benchmark/filter_value_benchmark.cpp", |
| 351 | "benchmark/get_dimensions_for_condition_benchmark.cpp", |
| 352 | "benchmark/hello_world_benchmark.cpp", |
| 353 | "benchmark/log_event_benchmark.cpp", |
| 354 | "benchmark/main.cpp", |
| 355 | "benchmark/metric_util.cpp", |
| 356 | "benchmark/stats_write_benchmark.cpp", |
tsaichristine | 9887f66 | 2020-03-20 17:03:49 -0700 | [diff] [blame] | 357 | "src/stats_log.proto", |
| 358 | ], |
| 359 | |
| 360 | proto: { |
| 361 | type: "lite", |
Jeffrey Huang | 8678a0f | 2020-11-24 22:28:38 +0000 | [diff] [blame] | 362 | include_dirs: [ |
| 363 | "external/protobuf/src", |
| 364 | "frameworks/proto_logging/stats", |
| 365 | ], |
tsaichristine | 9887f66 | 2020-03-20 17:03:49 -0700 | [diff] [blame] | 366 | }, |
| 367 | |
| 368 | cflags: [ |
| 369 | "-Wall", |
| 370 | "-Werror", |
| 371 | "-Wno-unused-parameter", |
| 372 | "-Wno-unused-variable", |
| 373 | "-Wno-unused-function", |
| 374 | |
| 375 | // Bug: http://b/29823425 Disable -Wvarargs for Clang update to r271374 |
| 376 | "-Wno-varargs", |
| 377 | ], |
| 378 | |
| 379 | static_libs: [ |
| 380 | "libplatformprotos", |
| 381 | "libstatssocket_private", |
| 382 | ], |
| 383 | |
| 384 | shared_libs: [ |
| 385 | "libgtest_prod", |
| 386 | "libprotobuf-cpp-lite", |
| 387 | "libstatslog", |
| 388 | ], |
| 389 | } |
Joe Onorato | be051c0 | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 390 | |
gopinath | 0b139d4 | 2018-08-22 16:45:57 -0700 | [diff] [blame] | 391 | // ==== java proto device library (for test only) ============================== |
| 392 | java_library { |
| 393 | name: "statsdprotolite", |
Anton Hansson | fc72279 | 2019-12-19 10:17:46 +0000 | [diff] [blame] | 394 | sdk_version: "core_current", |
gopinath | 0b139d4 | 2018-08-22 16:45:57 -0700 | [diff] [blame] | 395 | proto: { |
| 396 | type: "lite", |
Jeffrey Huang | 8678a0f | 2020-11-24 22:28:38 +0000 | [diff] [blame] | 397 | include_dirs: [ |
| 398 | "external/protobuf/src", |
| 399 | "frameworks/proto_logging/stats", |
| 400 | ], |
gopinath | 0b139d4 | 2018-08-22 16:45:57 -0700 | [diff] [blame] | 401 | }, |
| 402 | |
| 403 | srcs: [ |
Jeffrey Huang | 8678a0f | 2020-11-24 22:28:38 +0000 | [diff] [blame] | 404 | ":libstats_atoms_proto", |
Yao Chen | b16b8fd | 2019-01-03 16:49:14 -0800 | [diff] [blame] | 405 | "src/shell/shell_config.proto", |
| 406 | "src/shell/shell_data.proto", |
Ruchir Rastogi | f8c29b0 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 407 | "src/stats_log.proto", |
| 408 | "src/statsd_config.proto", |
gopinath | 0b139d4 | 2018-08-22 16:45:57 -0700 | [diff] [blame] | 409 | ], |
| 410 | |
| 411 | static_libs: [ |
| 412 | "platformprotoslite", |
| 413 | ], |
| 414 | // Protos have lots of MissingOverride and similar. |
| 415 | errorprone: { |
| 416 | javacflags: ["-XepDisableAllChecks"], |
| 417 | }, |
| 418 | } |
Harry Zhang | 530122e | 2019-02-26 10:47:04 -0800 | [diff] [blame] | 419 | |
Rahul Ravikumar | 12e5de9 | 2020-10-05 15:52:10 -0700 | [diff] [blame] | 420 | java_library { |
| 421 | name: "statsdprotonano", |
| 422 | sdk_version: "9", |
| 423 | proto: { |
| 424 | type: "nano", |
| 425 | output_params: ["store_unknown_fields=true"], |
Jeffrey Huang | 8678a0f | 2020-11-24 22:28:38 +0000 | [diff] [blame] | 426 | include_dirs: [ |
| 427 | "external/protobuf/src", |
| 428 | "frameworks/proto_logging/stats", |
| 429 | ], |
Rahul Ravikumar | 12e5de9 | 2020-10-05 15:52:10 -0700 | [diff] [blame] | 430 | }, |
| 431 | srcs: [ |
Jeffrey Huang | 8678a0f | 2020-11-24 22:28:38 +0000 | [diff] [blame] | 432 | ":libstats_atoms_proto", |
Rahul Ravikumar | 12e5de9 | 2020-10-05 15:52:10 -0700 | [diff] [blame] | 433 | "src/shell/shell_config.proto", |
| 434 | "src/shell/shell_data.proto", |
| 435 | "src/stats_log.proto", |
| 436 | "src/statsd_config.proto", |
| 437 | ], |
| 438 | static_libs: [ |
| 439 | "platformprotosnano", |
| 440 | ], |
| 441 | // Protos have lots of MissingOverride and similar. |
| 442 | errorprone: { |
| 443 | javacflags: ["-XepDisableAllChecks"], |
| 444 | }, |
| 445 | } |
| 446 | |
Harry Zhang | 530122e | 2019-02-26 10:47:04 -0800 | [diff] [blame] | 447 | // Filegroup for statsd config proto definition. |
| 448 | filegroup { |
| 449 | name: "statsd-config-proto-def", |
| 450 | srcs: ["src/statsd_config.proto"], |
| 451 | } |
Baligh Uddin | 89acb7a | 2020-12-03 02:02:06 +0000 | [diff] [blame] | 452 | |
| 453 | // Filegroup for all statsd protos |
| 454 | filegroup { |
| 455 | name: "statsd_internal_protos", |
| 456 | srcs: [ |
| 457 | "src/active_config_list.proto", |
| 458 | "src/experiment_ids.proto", |
Baligh Uddin | e9c9454 | 2020-12-03 17:39:16 +0000 | [diff] [blame] | 459 | "src/shell/shell_config.proto", |
| 460 | "src/shell/shell_data.proto", |
Baligh Uddin | 89acb7a | 2020-12-03 02:02:06 +0000 | [diff] [blame] | 461 | "src/statsd_config.proto", |
| 462 | "src/statsd_metadata.proto", |
| 463 | "src/stats_log.proto", |
| 464 | "src/uid_data.proto", |
| 465 | ], |
| 466 | } |