This helps save memory because FieldValues are copied around much more
than LogEvents.
+ removed unused variables from LogEvent
Test: bit statsd_test:*
Bug: 154267590
Change-Id: If444ef79c85a45526fce183b67d9d8a2e74fa10d
Errors are recorded within StatsdStats. The associated CL to change
stats_log.proto within google3 is at cr/306795778.
Test: adb shell dumpsys stats --metadata
Test: bit statsd_test:*
Bug: 144373276
Change-Id: Id80cace9350f77d64a2d401f7fac7b12501e82ee
- During the termination, StatsService is stopped while
StatsSocketListener is still running.
- This could cause invalid thread access.
Bug: 147316537
Test: Run a test app which keeps sending StatsLog and repeatedly execute
adb shell su root kill `pidof statsd`. statsd should not crash.
Change-Id: Iedd2dcb892f704bdba9adc864afa696de64b8e4c
The test tried to execute statsd_test when the binary was named
statsd_test32. This fixes the naming issue.
Bug: 153035538
Test: make mts and check the binary name
Change-Id: I13485a95801f9ef71211cd1d36e8ea1fd3bbc0b6
"am broadcast -a" rather than "am broadcast am"
Bug: 123230379
Test: commands #4 and #5 in bug report
Change-Id: I5c23cd86b4da1e03b65c9a68a3a9044466012e89
Use LogEvent::getAttributionChainIndex() to check presence of
attribution chains
Bug: 150414252
Test: bit statsd_test:*
Change-Id: Ic798d3b182c2b5aaf73444f2796d539cd3f7bf40
This is a temporary measure to avoid exporting filegroups in the SDK
snapshots. The version scripts will go away when libsigchain can be a
shared lib.
Test: Build and boot
Bug: 153338107
Bug: 142944043
Change-Id: Id7bff041413569342cc5dcaeff144287b2ae1ef9
Preparation for removing implicit include paths for jni.h from soong.
Also remove unnecessary jni.h includes from PathParser.{h,cpp}.
Bug: 152482542
Test: lunch aosp_x86_64 && m checkbuild
Change-Id: Ib18afa3d2c93ed3ce69204286d5177991100fd7e
Exempt-From-Owner-Approval: build refactoring
Added multilib to cc_test as a workaround to the build system being
unable to separate 32 and 64bit architectures.
Bug: 153035538
Test: m -j
Change-Id: Ib7f3b01816d7cbd69b3dbf4dbf63ccb22b0c5b6a
Use shouldTruncateTimestamp flag in LogEvent instead of the blacklist
to determine whether timestamp should be truncated.
Bug: 150414373
Test: bit statsd_test:*
Change-Id: I4e21ae4909484dd898b9fcd3ce7a018f5e9d982f
Use the annotation information in LogEvent/FieldValue instead.
- Initialize nested to true in FieldValue.mAnnotations
- Add filterPrimaryKey function to HashableDimensionKey for populating a
HashableDimensionKey with all FieldValues that have the primary key
annotation set.
- Create StateTrackers without checking if atom is a state atom. (We
can't do this check anymore)
- Remove mAtomId, mStateField, mNested, mPrimaryFields, mDefaultState,
mResetState members from StateTracker. Use the information passed in
LogEvent in onLogEvent instead.
- Update tests to log annotations when logging events.
- Remote kStateAtomsFieldOptions from atoms_info.
- Make MetricProducer::mStateGroupMap const
- Rename handlePartialReset to clearStateForPrimaryKey
- Store "default" states in mStateMap. An entry in mStateMap means the
state is not kStateUnknown. Before, an entry in mStateMap meant the
state is not the "default" state.
- Consolidate all state change logic in updateStateForPrimaryKey()
- remote StateTracker::updateState
- handleReset and clearStateForPrimaryKey call
updateStateForPrimaryKey for resetting and clearing of states
respectively.
- Create a helper method for notifying StateTracker listeners
- Make StateManager::registerListener void
Bug: 151110842
Test: bit statsd_test:*
Change-Id: Ifb8371b213a178fcccaa484086fbdd283dbaec49
This is a sychronizing primitive that is similar to a latch, but a
thread must count down with an identifier. It will be used to make sure
the boot complete, uid map, and all pullers signals are received before
triggering the bucket split.
The latch's countDown operation takes in a string identifier, so that if
the same operation happens twice, it is only counted once.
Bug: 144099206
Test: atest statsd_test
Change-Id: I261a3e50eabbc4998ca30ddf2d67a9a1e788911e
Define new atoms to better log and understand various user journeys,
such as user switches, user starts, and user creation.
The UserLifecycleJourneyReported atom defines a user's journey and
holds a user's information such as their user id, user type, and flags
associated with the user. This atom includes a session-id which is used
to link to the UserLifecycleEventOccurred atom which keeps track of
lifycycle events that occur throughout a user's journey. As more user
journeys are defined, there could be more Events added in the future.
Note: the JourneyReported atom can currently be logged more than once
per user journey since there is no record of the user's ongoing journey.
This will be updated in a future CL.
Bug: 146505521
Bug: 150788910
Test: statsd_testdrive 264 265
Change-Id: Iff3847be64d718fb2ec17e58c33d47f7fa4b627a
Install a handler that ignores SIGPIPE. Before this, SIGPIPE was not
being handled, which caused a SIGKILL to be sent to statsd. Note that
even if SIGPIPE is handled, writes to closed pipes will return EPIPE.
Bug: 153595161
Test: procedure specified in b/153595161
1. cat statsd config | adb shell cmd stats data-subscribe
2. Terminate the shell command
3. cat statsd config | adb shell cmd stats data-subscribe
Change-Id: Ib5e679ccd7cdf7182452466b316488439871db99
When copying over the fields into Google3 the linter failed on two field
names that are camel case rather than snake case. Changing here so the
two match. In addition, one of the enum fields didn't have a default
value.
Bug: 147508495
Test: compiles + ChooserActivityTest runs
Change-Id: Iacec9654350763e691a4a10087f693839fd5ea83
With b/152655547, all aidl_interface modules are considered as stable
unless it is explicitly with "unstable: true". This change marks the
aidl_interface that are not used across updatable module bounraries
as unstable, so that the build system does not run the API
dumping/checking on them.
Bug: 152655547
Test: m
Change-Id: I1257c66de6dd42b2d32d47ed74cb2878f79d14fb