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