platform_system_core/liblog/tests
Tom Cherry 662b4691b1 liblog: add benchmark tests for not-printed message
Add a BM_log_verbose_overhead test that measure the overhead of
writing a log message that will not be printed due to verbosity
levels.  This was optimized in R to not format the log messages before
checking if they will be logged.

Results with R:
BM_log_verbose_overhead_null_mean          159 ns     159 ns    100
BM_log_verbose_overhead_null_median        159 ns     159 ns    100
BM_log_verbose_overhead_null_stddev        0.568 ns   0.464 ns  100
Results with Q:
M_log_verbose_overhead_null_mean           601 ns     600 ns    100
BM_log_verbose_overhead_null_median        601 ns     600 ns    100
BM_log_verbose_overhead_null_stddev        2.40 ns    2.23 ns   100

This benchmark shows liblog's overhead when not printing a log message
to be nearly ~4x faster than with Q.

Test: run this benchmark
Change-Id: I09a60e61bf064330bf15a9d0a946acf16e777a6d
2020-02-21 16:38:31 -08:00
..
Android.bp liblog: fix host tests 2020-01-28 13:07:11 -08:00
AndroidTest.xml CtsLiblogTestCases secondary_user 2020-01-06 09:58:07 -08:00
libc_test.cpp liblog: simplify socket_local_client() and always use CLOEXEC 2019-02-12 12:53:19 -08:00
liblog_benchmark.cpp liblog: add benchmark tests for not-printed message 2020-02-21 16:38:31 -08:00
liblog_default_tag.cpp liblog: fix host tests 2020-01-28 13:07:11 -08:00
liblog_global_state.cpp liblog: fix host tests 2020-01-28 13:07:11 -08:00
liblog_host_test.cpp liblog: fix host tests 2020-01-28 13:07:11 -08:00
liblog_test.cpp Rename ro.device_owner system property 2020-02-19 10:34:36 +00:00
log_id_test.cpp Small liblog test fixes & readability improvements. 2017-08-25 14:53:21 +01:00
log_radio_test.cpp liblog: simplify socket_local_client() and always use CLOEXEC 2019-02-12 12:53:19 -08:00
log_read_test.cpp liblog: use RunLogTests() for more tests 2019-10-14 13:11:26 -07:00
log_system_test.cpp liblog: simplify socket_local_client() and always use CLOEXEC 2019-02-12 12:53:19 -08:00
log_time_test.cpp Use #pragma one for all liblog includes 2019-01-16 10:49:45 -08:00
log_wrap_test.cpp liblog: remove alarm in logd_reader.cpp 2019-10-08 13:05:55 -07:00
logprint_test.cpp liblog: display valid utf8 characters with 'printable' log format 2019-04-29 09:14:37 -07:00
rwlock_test.cpp liblog: use a rwlock for writer initialization 2019-12-12 16:19:08 -08:00