* Use salted hashed Bluetooth device identifier and deprecate old
ofuscted_id
* Add BluetoothAclConnectionStateChanged and BluetoothScoConnectionStateChanged
to track ACL and SCO connections
Bug: 112969790
Test: Bluetooth unit test, test drive with statsd
Change-Id: I5398e4caae751e1fe1d6a95fa3bc56d062eb6172
Merged-In: I5398e4caae751e1fe1d6a95fa3bc56d062eb6172
(cherry picked from commit d9837c8a9e9c91d9907ea10e67bf6c6581ba1b4b)
* Add this atom to report events related to Bluetooth link layer
connection, including:
- Obfuscated ID of remote device
- Connection handle
- Direction of the connection
- Type of the connection
- Associated HCI command and/or event
- Status code associated with HCI command and/or event
- Reason code associated with HCI command and/or event
* Add enum definitions for HCI commands and events as defined in the
Bluetooth 5.0 specification
* Add enum definitions for link type and direction
Bug: 112969790
Test: make, test drive with statsd
Change-Id: I0fdc59274d49ad503e9ba9cf8f49c9d8872a4131
Merged-In: I0fdc59274d49ad503e9ba9cf8f49c9d8872a4131
(cherry picked from commit ab86dbd20cf17a1389d42135865eabfc4fc48604)
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: I57b03766b585bb38e657e772dc4d6c3ad69a5237
Merged-in: I4588cec0dea8a4c5a19847a32a6d53bfc5953be7
Test: run runtests.sh, make sure no missing test and get all pass
run /out/host/linux-x86/bin/statsd_testdrive
116
Got following metric data dump:pass for local test
Bug: 119862317
Change-Id: I83ee8500fac7f443711ced097cbd376feb801ccf
Merged-in: I4588cec0dea8a4c5a19847a32a6d53bfc5953be7
Test: unit test added
Bug: 120635548
Change-Id: I825b1ce526944a20fe65705508ad180ece37492c
Merged-In: I825b1ce526944a20fe65705508ad180ece37492c
(cherry picked from commit 8e6f9983009eadf32d05ad65e38906d3985bc9ba)
There are an increasing number of requests to log data in complex format to statsd, while the data
is not expected to be parsed or aggregated by statsd and only to be uploaded as events.
Instead of making an exception for each of these cases in a hard coded way, this CL add a feature to
annotate these field in atoms.proto and the stats-log-api-gen tool will produce byte array
interfaces for them.
Note that log_msg does not have byte array type, and only has string type, when statsd receives the
log, these fields are in string type. Only when the atom is written to proto, we will check if this
field should be bytes field and write it to protobuf in message format.
Change-Id: If53dd95c5826710c76d7fe982bf951a435dfc738
Merged-In: If53dd95c5826710c76d7fe982bf951a435dfc738
Fix: 118386797
Bug: 120635548
Test: unit test & manual test
(cherry picked from commit bbdd67d19f4912fbec00220b22e44c68eff5ab3f)
KernelUidCpuTimeReader reads microseconds, but they are written to a
millisecond field in atoms.proto. Introduced in ag/3693225.
See google3 change: cl/222044203
Test: build
Bug: 119853118
Change-Id: I170e996aa852e28a246a98226677907bb3560371
Currently, statsd uses wall clock seconds to write data to disk. This
issue affects both thermal and normal shutdowns, because if two writes
occur in the same second, the more recent write will overwrite the older
write, erasing the actual data that we want.
For thermal shutdowns, we write twice. Once because of termination
signal received, and once because of binder death recipient from
statscompanion service.
For normal clean shutdowns, we write 3 times. In addition to the two
above, we write for the shutdown received signal.
This fix introduces a cool down period of 3 seconds between writing to
disk.
Bug: 112432890
Test: statsd unit tests
Test: statsd cts tests
Test: manually verified normal shutdown had 1 file written to disk
Test: manually verified thermal shutdown had 1 file written to disk
Change-Id: I4cd39de9063935e762ff7d00051ccc915f31e89a
Protobuf 3.5.2 redefines google::protobuf::uint64 from unsigned long
long to uint64_t, which is sometimes unsigned long and sometimes
unsigned long long. Use PRIu64 to print it, and add an implementation
of ProtoOutputStream::write for long.
Bug: 117607748
Test: m checkbuild
Change-Id: I48912f58e2f63f4a98c3aefaa4f78cc2c719bb68
libplatformprotos for the device is compiled using proto lite, and
statsd_test and statsd_benchmark have protos that reference the
libplatformprotos. With protobuf 3.5.2 compiling a full proto
against a lite proto doesn't work. Convert them to lite. Requires
adding the protobuf internal protos to the sources,
libprotobuf-cpp-lite does not contain the compiled version of
field_options.proto.
Bug: 117607748
Test: m checkbuild
Change-Id: I6a618c4118972c0e5ffb07a361ac6612b9069c5d
See build/soong/README.md for more information.
Test: m checkbuild
Merged-In: I8c80878cec46c9299234c6f4c1e0e19efc0a221e
Change-Id: I8c80878cec46c9299234c6f4c1e0e19efc0a221e
This is a cherry-pick from master to pi-dev.
Test: local test
BUG: b/112432890
Change-Id: Ie360f5c8df53d3b5b04f23df43ab8dc14b69ae26
Merged-In: Iaed318671a719cc366d4e6be9f77270147ba6596
Background: BatteryStatsService tracks the phone scanning time metric. In Q,
we are migrating the dumpsys-based collection to the new infra. This CL is to
instrument the new logging mechanism.
Test: statsd test
FIX: b/116748990
Change-Id: I3cf5e0026bfc6f594c5f7b524f14b3a43b702afb
The current wording seems to suggest allocating an infinite number of
fields, which is not future-proof.
Bug: 72866543
Test: N/A
Change-Id: I88732ea8695521a39f20524348547cfe50cbf776
Previously, fdopen was being called on a file descriptor that was owned
by a unique_fd without releasing. This leads to a double close, since
both fclose and the unique_fd destructor will try to close the fd.
Bug: http://b/113880863
Test: treehugger
Change-Id: I6f6f48d304861b5e4d7efee0d3ad0e30178a95a4
Statsd hashes (using its own hashing function) raw strings to reduce the
upload data size when there are duplicate strings in the report. And in cloud,
the clearcut translator would backfill the strings.
In a few droidfood users, we find the translator was unable to do that. While
debugging the root cause, we first decided to provide an option to disable
the hashing from the cloud.
Test: statsd unit test, CTS test, tested manually
BUG: b/79943763
Change-Id: If0359c8cf3f3cf83a2938db9ebf95ea7906f0b0c