Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1 | // |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 2 | // Copyright (C) 2017 The Android Open Source Project |
Yao Chen | d54f9dd | 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 | |
| 17 | // ========================================================== |
| 18 | // Build the library for use on the host |
| 19 | // ========================================================== |
| 20 | cc_library_host_shared { |
| 21 | name: "libstats_proto_host", |
| 22 | srcs: [ |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 23 | "src/atoms.proto", |
Yao Chen | 9c1debe | 2018-02-19 14:39:19 -0800 | [diff] [blame] | 24 | "src/atom_field_options.proto", |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 25 | ], |
| 26 | |
| 27 | shared_libs: [ |
| 28 | "libplatformprotos", |
| 29 | ], |
| 30 | |
| 31 | proto: { |
| 32 | type: "full", |
| 33 | export_proto_headers: true, |
Yao Chen | 9c1debe | 2018-02-19 14:39:19 -0800 | [diff] [blame] | 34 | include_dirs: [ |
| 35 | "external/protobuf/src", |
| 36 | ], |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 37 | }, |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 38 | |
| 39 | export_shared_lib_headers: [ |
| 40 | "libplatformprotos", |
| 41 | ] |
| 42 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 43 | } |
| 44 | |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 45 | cc_defaults { |
| 46 | name: "statsd_defaults", |
| 47 | aidl: { |
| 48 | include_dirs: ["frameworks/base/core/java"], |
| 49 | }, |
| 50 | |
| 51 | srcs: [ |
| 52 | ":statsd_aidl", |
Mark Tabry | 9dc1357 | 2019-11-06 13:42:30 -0800 | [diff] [blame] | 53 | ":ICarStatsService.aidl", |
Chenjie Yu | c7939cb | 2019-02-04 17:25:45 -0800 | [diff] [blame] | 54 | "src/active_config_list.proto", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 55 | "src/anomaly/AlarmMonitor.cpp", |
| 56 | "src/anomaly/AlarmTracker.cpp", |
| 57 | "src/anomaly/AnomalyTracker.cpp", |
| 58 | "src/anomaly/DurationAnomalyTracker.cpp", |
| 59 | "src/anomaly/subscriber_util.cpp", |
| 60 | "src/condition/CombinationConditionTracker.cpp", |
| 61 | "src/condition/condition_util.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 62 | "src/condition/ConditionWizard.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 63 | "src/condition/SimpleConditionTracker.cpp", |
tsaichristine | c46fbf9 | 2019-09-04 15:47:57 -0700 | [diff] [blame] | 64 | "src/condition/StateConditionTracker.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 65 | "src/config/ConfigKey.cpp", |
| 66 | "src/config/ConfigListener.cpp", |
| 67 | "src/config/ConfigManager.cpp", |
Mark Tabry | 9dc1357 | 2019-11-06 13:42:30 -0800 | [diff] [blame] | 68 | "src/external/CarStatsPuller.cpp", |
Yiwei Zhang | 7e63303 | 2019-03-01 17:25:27 -0800 | [diff] [blame] | 69 | "src/external/GpuStatsPuller.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 70 | "src/external/Perfetto.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 71 | "src/external/PowerStatsPuller.cpp", |
Tej Singh | 6a5c943 | 2019-10-11 11:07:06 -0700 | [diff] [blame] | 72 | "src/external/PullResultReceiver.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 73 | "src/external/puller_util.cpp", |
| 74 | "src/external/ResourceHealthManagerPuller.cpp", |
Tej Singh | a0c89dd | 2019-01-25 16:39:18 -0800 | [diff] [blame] | 75 | "src/external/StatsCallbackPuller.cpp", |
Tej Singh | 6a5c943 | 2019-10-11 11:07:06 -0700 | [diff] [blame] | 76 | "src/external/StatsCallbackPullerDeprecated.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 77 | "src/external/StatsCompanionServicePuller.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 78 | "src/external/StatsPuller.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 79 | "src/external/StatsPullerManager.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 80 | "src/external/SubsystemSleepStatePuller.cpp", |
Alec Mouri | 1dc5f1e | 2019-09-18 21:13:01 -0700 | [diff] [blame] | 81 | "src/external/SurfaceflingerStatsPuller.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 82 | "src/external/TrainInfoPuller.cpp", |
| 83 | "src/FieldValue.cpp", |
| 84 | "src/guardrail/StatsdStats.cpp", |
| 85 | "src/hash.cpp", |
| 86 | "src/HashableDimensionKey.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 87 | "src/logd/LogEvent.cpp", |
Yao Chen | 0f86186 | 2019-03-27 11:51:15 -0700 | [diff] [blame] | 88 | "src/logd/LogEventQueue.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 89 | "src/matchers/CombinationLogMatchingTracker.cpp", |
| 90 | "src/matchers/EventMatcherWizard.cpp", |
| 91 | "src/matchers/matcher_util.cpp", |
| 92 | "src/matchers/SimpleLogMatchingTracker.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 93 | "src/metrics/CountMetricProducer.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 94 | "src/metrics/duration_helper/MaxDurationTracker.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 95 | "src/metrics/duration_helper/OringDurationTracker.cpp", |
| 96 | "src/metrics/DurationMetricProducer.cpp", |
| 97 | "src/metrics/EventMetricProducer.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 98 | "src/metrics/GaugeMetricProducer.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 99 | "src/metrics/MetricProducer.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 100 | "src/metrics/metrics_manager_util.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 101 | "src/metrics/MetricsManager.cpp", |
| 102 | "src/metrics/ValueMetricProducer.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 103 | "src/packages/UidMap.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 104 | "src/shell/shell_config.proto", |
| 105 | "src/shell/ShellSubscriber.cpp", |
| 106 | "src/socket/StatsSocketListener.cpp", |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 107 | "src/state/StateManager.cpp", |
| 108 | "src/state/StateTracker.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 109 | "src/stats_log_util.cpp", |
| 110 | "src/statscompanion_util.cpp", |
| 111 | "src/statsd_config.proto", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 112 | "src/StatsLogProcessor.cpp", |
| 113 | "src/StatsService.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 114 | "src/storage/StorageManager.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 115 | "src/subscriber/IncidentdReporter.cpp", |
| 116 | "src/subscriber/SubscriberReporter.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 117 | "src/uid_data.proto", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 118 | ], |
| 119 | |
Ruchir Rastogi | 1fb525e | 2019-11-07 14:08:24 -0800 | [diff] [blame] | 120 | cflags: [ |
| 121 | // "-DNEW_ENCODING_SCHEME", |
| 122 | ], |
| 123 | |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 124 | local_include_dirs: [ |
| 125 | "src", |
| 126 | ], |
| 127 | |
| 128 | static_libs: [ |
| 129 | "libhealthhalutils", |
Joe Onorato | 99598ee | 2019-02-11 15:55:13 +0000 | [diff] [blame] | 130 | "libplatformprotos", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 131 | ], |
| 132 | |
| 133 | shared_libs: [ |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 134 | "android.frameworks.stats@1.0", |
| 135 | "android.hardware.health@2.0", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 136 | "android.hardware.power.stats@1.0", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 137 | "android.hardware.power@1.0", |
| 138 | "android.hardware.power@1.1", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 139 | "libbase", |
| 140 | "libbinder", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 141 | "libcutils", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 142 | "libgraphicsenv", |
| 143 | "libhidlbase", |
| 144 | "libincident", |
| 145 | "liblog", |
| 146 | "libprotoutil", |
| 147 | "libservices", |
| 148 | "libstatslog", |
Muhammad Qureshi | c8e2266 | 2019-11-20 17:18:03 -0800 | [diff] [blame] | 149 | "libstatsmetadata", |
Tej Singh | a02bfab | 2019-10-01 19:03:24 -0700 | [diff] [blame] | 150 | "libstatssocket", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 151 | "libsysutils", |
Alec Mouri | 1dc5f1e | 2019-09-18 21:13:01 -0700 | [diff] [blame] | 152 | "libtimestats_proto", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 153 | "libutils", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 154 | ], |
| 155 | } |
| 156 | |
Muhammad Qureshi | c8e2266 | 2019-11-20 17:18:03 -0800 | [diff] [blame] | 157 | // ================ |
| 158 | // libstatsmetadata |
| 159 | // ================ |
| 160 | |
| 161 | genrule { |
| 162 | name: "atoms_info.h", |
| 163 | tools: ["stats-log-api-gen"], |
| 164 | cmd: "$(location stats-log-api-gen) --atomsInfoHeader $(genDir)/atoms_info.h", |
| 165 | out: [ |
| 166 | "atoms_info.h", |
| 167 | ], |
| 168 | } |
| 169 | |
| 170 | genrule { |
| 171 | name: "atoms_info.cpp", |
| 172 | tools: ["stats-log-api-gen"], |
| 173 | cmd: "$(location stats-log-api-gen) --atomsInfoCpp $(genDir)/atoms_info.cpp", |
| 174 | out: [ |
| 175 | "atoms_info.cpp", |
| 176 | ], |
| 177 | } |
| 178 | |
| 179 | cc_library_shared { |
| 180 | name: "libstatsmetadata", |
| 181 | host_supported: true, |
| 182 | generated_sources: [ |
| 183 | "atoms_info.cpp", |
| 184 | ], |
| 185 | generated_headers: [ |
| 186 | "atoms_info.h", |
| 187 | ], |
| 188 | cflags: [ |
| 189 | "-Wall", |
| 190 | "-Werror", |
| 191 | ], |
| 192 | export_generated_headers: [ |
| 193 | "atoms_info.h", |
| 194 | ], |
| 195 | shared_libs: [ |
| 196 | "libcutils", |
| 197 | "libstatslog", |
| 198 | ], |
| 199 | target: { |
| 200 | android: { |
| 201 | shared_libs: [ |
| 202 | "libutils", |
| 203 | ], |
| 204 | }, |
| 205 | host: { |
| 206 | static_libs: [ |
| 207 | "libutils", |
| 208 | ], |
| 209 | }, |
| 210 | }, |
| 211 | } |
| 212 | |
| 213 | |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 214 | // ========= |
| 215 | // statsd |
| 216 | // ========= |
| 217 | |
| 218 | cc_binary { |
| 219 | name: "statsd", |
| 220 | defaults: ["statsd_defaults"], |
| 221 | |
| 222 | srcs: ["src/main.cpp"], |
| 223 | |
| 224 | cflags: [ |
| 225 | "-Wall", |
| 226 | "-Wextra", |
| 227 | "-Werror", |
| 228 | "-Wno-unused-parameter", |
| 229 | // optimize for size (protobuf glop can get big) |
| 230 | "-Os", |
| 231 | // "-g", |
| 232 | // "-O0", |
| 233 | ], |
| 234 | |
| 235 | product_variables: { |
| 236 | eng: { |
| 237 | // Enable sanitizer ONLY on eng builds |
| 238 | //sanitize: { |
| 239 | // address: true, |
| 240 | //}, |
| 241 | }, |
| 242 | debuggable: { |
| 243 | // Add a flag to enable stats log printing from statsd on debug builds. |
| 244 | cflags: ["-DVERY_VERBOSE_PRINTING"], |
| 245 | }, |
| 246 | }, |
| 247 | |
| 248 | proto: { |
| 249 | type: "lite", |
| 250 | }, |
| 251 | |
| 252 | shared_libs: ["libgtest_prod"], |
| 253 | |
Howard Ro | 1260bb4 | 2018-10-29 17:22:36 -0700 | [diff] [blame] | 254 | vintf_fragments: ["android.frameworks.stats@1.0-service.xml"], |
| 255 | |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 256 | init_rc: ["statsd.rc"], |
| 257 | } |
| 258 | |
| 259 | // ============== |
| 260 | // statsd_test |
| 261 | // ============== |
| 262 | |
| 263 | cc_test { |
| 264 | name: "statsd_test", |
| 265 | defaults: ["statsd_defaults"], |
| 266 | test_suites: ["device-tests"], |
| 267 | |
| 268 | cflags: [ |
| 269 | "-Wall", |
| 270 | "-Werror", |
| 271 | "-Wno-missing-field-initializers", |
| 272 | "-Wno-unused-variable", |
| 273 | "-Wno-unused-function", |
| 274 | "-Wno-unused-parameter", |
| 275 | ], |
| 276 | |
| 277 | srcs: [ |
Colin Cross | 3f51ab5 | 2018-10-26 23:28:02 -0700 | [diff] [blame] | 278 | // atom_field_options.proto needs field_options.proto, but that is |
| 279 | // not included in libprotobuf-cpp-lite, so compile it here. |
| 280 | ":libprotobuf-internal-protos", |
| 281 | |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 282 | "src/atom_field_options.proto", |
| 283 | "src/atoms.proto", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 284 | "src/shell/shell_data.proto", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 285 | "src/stats_log.proto", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 286 | "tests/AlarmMonitor_test.cpp", |
| 287 | "tests/anomaly/AlarmTracker_test.cpp", |
| 288 | "tests/anomaly/AnomalyTracker_test.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 289 | "tests/condition/CombinationConditionTracker_test.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 290 | "tests/condition/ConditionTimer_test.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 291 | "tests/condition/SimpleConditionTracker_test.cpp", |
tsaichristine | c46fbf9 | 2019-09-04 15:47:57 -0700 | [diff] [blame] | 292 | "tests/condition/StateConditionTracker_test.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 293 | "tests/ConfigManager_test.cpp", |
| 294 | "tests/e2e/Alarm_e2e_test.cpp", |
| 295 | "tests/e2e/Anomaly_count_e2e_test.cpp", |
| 296 | "tests/e2e/Anomaly_duration_sum_e2e_test.cpp", |
| 297 | "tests/e2e/Attribution_e2e_test.cpp", |
| 298 | "tests/e2e/ConfigTtl_e2e_test.cpp", |
tsaichristine | d21aacf | 2019-10-07 14:47:38 -0700 | [diff] [blame] | 299 | "tests/e2e/CountMetric_e2e_test.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 300 | "tests/e2e/DurationMetric_e2e_test.cpp", |
| 301 | "tests/e2e/GaugeMetric_e2e_pull_test.cpp", |
| 302 | "tests/e2e/GaugeMetric_e2e_push_test.cpp", |
| 303 | "tests/e2e/MetricActivation_e2e_test.cpp", |
| 304 | "tests/e2e/MetricConditionLink_e2e_test.cpp", |
| 305 | "tests/e2e/PartialBucket_e2e_test.cpp", |
| 306 | "tests/e2e/ValueMetric_pull_e2e_test.cpp", |
| 307 | "tests/e2e/WakelockDuration_e2e_test.cpp", |
| 308 | "tests/external/GpuStatsPuller_test.cpp", |
| 309 | "tests/external/IncidentReportArgs_test.cpp", |
| 310 | "tests/external/puller_util_test.cpp", |
Tej Singh | 8981763 | 2019-12-09 16:58:08 -0800 | [diff] [blame] | 311 | "tests/external/StatsCallbackPuller_test.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 312 | "tests/external/StatsPuller_test.cpp", |
Alec Mouri | 1dc5f1e | 2019-09-18 21:13:01 -0700 | [diff] [blame] | 313 | "tests/external/SurfaceflingerStatsPuller_test.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 314 | "tests/FieldValue_test.cpp", |
| 315 | "tests/guardrail/StatsdStats_test.cpp", |
| 316 | "tests/indexed_priority_queue_test.cpp", |
| 317 | "tests/log_event/LogEventQueue_test.cpp", |
| 318 | "tests/LogEntryMatcher_test.cpp", |
| 319 | "tests/LogEvent_test.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 320 | "tests/metrics/CountMetricProducer_test.cpp", |
| 321 | "tests/metrics/DurationMetricProducer_test.cpp", |
| 322 | "tests/metrics/EventMetricProducer_test.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 323 | "tests/metrics/GaugeMetricProducer_test.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 324 | "tests/metrics/MaxDurationTracker_test.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 325 | "tests/metrics/metrics_test_helper.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 326 | "tests/metrics/OringDurationTracker_test.cpp", |
| 327 | "tests/metrics/ValueMetricProducer_test.cpp", |
| 328 | "tests/MetricsManager_test.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 329 | "tests/shell/ShellSubscriber_test.cpp", |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 330 | "tests/state/StateTracker_test.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 331 | "tests/statsd_test_util.cpp", |
| 332 | "tests/StatsLogProcessor_test.cpp", |
| 333 | "tests/StatsService_test.cpp", |
| 334 | "tests/storage/StorageManager_test.cpp", |
| 335 | "tests/UidMap_test.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 336 | ], |
| 337 | |
| 338 | static_libs: [ |
| 339 | "libgmock", |
| 340 | "libplatformprotos", |
| 341 | ], |
| 342 | |
| 343 | proto: { |
Colin Cross | 3f51ab5 | 2018-10-26 23:28:02 -0700 | [diff] [blame] | 344 | type: "lite", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 345 | include_dirs: ["external/protobuf/src"], |
| 346 | }, |
| 347 | |
Ruchir Rastogi | 1fb525e | 2019-11-07 14:08:24 -0800 | [diff] [blame] | 348 | shared_libs: [ |
| 349 | "libprotobuf-cpp-lite", |
| 350 | "libstatssocket" |
| 351 | ], |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 352 | |
| 353 | } |
| 354 | |
| 355 | //############################# |
| 356 | // statsd micro benchmark |
| 357 | //############################# |
| 358 | |
| 359 | cc_benchmark { |
| 360 | name: "statsd_benchmark", |
| 361 | defaults: ["statsd_defaults"], |
| 362 | |
| 363 | srcs: [ |
Colin Cross | 3f51ab5 | 2018-10-26 23:28:02 -0700 | [diff] [blame] | 364 | // atom_field_options.proto needs field_options.proto, but that is |
| 365 | // not included in libprotobuf-cpp-lite, so compile it here. |
| 366 | ":libprotobuf-internal-protos", |
| 367 | |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 368 | "benchmark/duration_metric_benchmark.cpp", |
| 369 | "benchmark/filter_value_benchmark.cpp", |
| 370 | "benchmark/get_dimensions_for_condition_benchmark.cpp", |
| 371 | "benchmark/hello_world_benchmark.cpp", |
| 372 | "benchmark/log_event_benchmark.cpp", |
| 373 | "benchmark/main.cpp", |
| 374 | "benchmark/metric_util.cpp", |
| 375 | "benchmark/stats_write_benchmark.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 376 | "src/atom_field_options.proto", |
| 377 | "src/atoms.proto", |
| 378 | "src/stats_log.proto", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 379 | ], |
| 380 | |
| 381 | proto: { |
Colin Cross | 3f51ab5 | 2018-10-26 23:28:02 -0700 | [diff] [blame] | 382 | type: "lite", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 383 | include_dirs: ["external/protobuf/src"], |
| 384 | }, |
| 385 | |
| 386 | cflags: [ |
| 387 | "-Wall", |
| 388 | "-Werror", |
| 389 | "-Wno-unused-parameter", |
| 390 | "-Wno-unused-variable", |
| 391 | "-Wno-unused-function", |
| 392 | |
| 393 | // Bug: http://b/29823425 Disable -Wvarargs for Clang update to r271374 |
Ruchir Rastogi | 1736ba4 | 2019-11-04 14:37:13 -0800 | [diff] [blame] | 394 | "-Wno-varargs", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 395 | ], |
| 396 | |
| 397 | static_libs: [ |
| 398 | "libplatformprotos", |
| 399 | ], |
| 400 | |
| 401 | shared_libs: [ |
| 402 | "libgtest_prod", |
Colin Cross | 3f51ab5 | 2018-10-26 23:28:02 -0700 | [diff] [blame] | 403 | "libprotobuf-cpp-lite", |
Ruchir Rastogi | 1736ba4 | 2019-11-04 14:37:13 -0800 | [diff] [blame] | 404 | "libstatslog", |
| 405 | "libstatssocket", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 406 | ], |
| 407 | } |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 408 | |
gopinath | a9864fd | 2018-08-22 16:45:57 -0700 | [diff] [blame] | 409 | // ==== java proto device library (for test only) ============================== |
| 410 | java_library { |
| 411 | name: "statsdprotolite", |
Paul Duffin | 8fcace4 | 2019-06-12 13:47:18 +0100 | [diff] [blame] | 412 | sdk_version: "core_platform", |
gopinath | a9864fd | 2018-08-22 16:45:57 -0700 | [diff] [blame] | 413 | proto: { |
| 414 | type: "lite", |
| 415 | include_dirs: ["external/protobuf/src"], |
| 416 | }, |
| 417 | |
| 418 | srcs: [ |
gopinath | a9864fd | 2018-08-22 16:45:57 -0700 | [diff] [blame] | 419 | "src/atoms.proto", |
Yao Chen | 35cb8d6 | 2019-01-03 16:49:14 -0800 | [diff] [blame] | 420 | "src/shell/shell_config.proto", |
| 421 | "src/shell/shell_data.proto", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 422 | "src/stats_log.proto", |
| 423 | "src/statsd_config.proto", |
gopinath | a9864fd | 2018-08-22 16:45:57 -0700 | [diff] [blame] | 424 | ], |
| 425 | |
| 426 | static_libs: [ |
| 427 | "platformprotoslite", |
| 428 | ], |
| 429 | // Protos have lots of MissingOverride and similar. |
| 430 | errorprone: { |
| 431 | javacflags: ["-XepDisableAllChecks"], |
| 432 | }, |
| 433 | } |
Harry Zhang | fe16c8f | 2019-02-26 10:47:04 -0800 | [diff] [blame] | 434 | |
| 435 | // Filegroup for statsd config proto definition. |
| 436 | filegroup { |
| 437 | name: "statsd-config-proto-def", |
| 438 | srcs: ["src/statsd_config.proto"], |
| 439 | } |