diff options
author | James Hawkins <jhawkins@google.com> | 2017-01-31 11:42:24 -0800 |
---|---|---|
committer | James Hawkins <jhawkins@google.com> | 2017-01-31 11:42:24 -0800 |
commit | 9aec926f866f54a311bd898b5f51188f9890a357 (patch) | |
tree | 08b5f51a1f60e3e3df41c27d49e240867e537864 /libmetricslogger/Android.bp | |
parent | 7dde4fa4e2a4949c7d7e6a8376b5c9bda26e38f8 (diff) | |
download | core-9aec926f866f54a311bd898b5f51188f9890a357.tar.gz core-9aec926f866f54a311bd898b5f51188f9890a357.tar.bz2 core-9aec926f866f54a311bd898b5f51188f9890a357.zip |
libmetricslogger: Refactor Tron metrics histogram logging out of
bootstat.
To be shared with other native components that want to log histograms.
Bug: 34456830
Test: libmetricslogger_test
Change-Id: I94a1a91c6d33e443d66bc480158dc2470d6c9031
Diffstat (limited to 'libmetricslogger/Android.bp')
-rw-r--r-- | libmetricslogger/Android.bp | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/libmetricslogger/Android.bp b/libmetricslogger/Android.bp new file mode 100644 index 000000000..ca8af574a --- /dev/null +++ b/libmetricslogger/Android.bp @@ -0,0 +1,64 @@ +// Copyright 2017 The Android Open Source Project + +metricslogger_lib_src_files = [ + "metrics_logger.cpp", +] + +cc_defaults { + name: "metricslogger_defaults", + + clang: true, + host_supported: true, + + export_include_dirs: ["include"], + local_include_dirs: ["include"], + shared_libs: ["liblog"], + whole_static_libs: ["libgtest_prod"], + + cflags: [ + "-Wall", + "-Wextra", + "-Werror", + + // 524291 corresponds to sysui_histogram, from + // frameworks/base/core/java/com/android/internal/logging/EventLogTags.logtags + "-DHISTOGRAM_LOG_TAG=524291", + ], +} + +// metricslogger shared library +// ----------------------------------------------------------------------------- +cc_library_shared { + name: "libmetricslogger", + srcs: metricslogger_lib_src_files, + defaults: ["metricslogger_defaults"], +} + +// metricslogger shared library, debug +// ----------------------------------------------------------------------------- +cc_library_shared { + name: "libmetricslogger_debug", + srcs: metricslogger_lib_src_files, + defaults: ["metricslogger_defaults"], + + target: { + host: { + cflags: ["-UNDEBUG"], + }, + }, +} + +// Native tests +// ----------------------------------------------------------------------------- +cc_test { + name: "metricslogger_tests", + defaults: ["metricslogger_defaults"], + shared_libs: [ + "libbase", + "libmetricslogger_debug", + ], + srcs: [ + "metrics_logger_test.cpp", + "testrunner.cpp", + ], +} |