commit | 5adc7e008b5057a0d47e080b5546bb7f9c4e9f04 | [log] [tgz] |
---|---|---|
author | tsaichristine <tsaichristine@google.com> | Tue Jan 14 17:07:39 2020 -0800 |
committer | tsaichristine <tsaichristine@google.com> | Thu Jan 16 17:35:29 2020 -0800 |
tree | 6c05fd6d2265b139cf54f09fb7c02e82e7f7b943 | |
parent | 78bfd35ae1b0266cff5325a751880b9e1f0f72c0 [diff] [blame] |
Allow default state, reset state, and nesting for binary states Every state atom can have a customized default state and reset state by annotating atoms.proto. Binary state atoms (such as WakelockStateChanged) can turn on nested counting by annotating atoms.proto as well. Generated atoms_info.h before change: https://paste.googleplex.com/4626190063108096 Generated atoms_info.h after change: https://paste.googleplex.com/5410938863747072 Generated atoms_info.cpp before change: https://paste.googleplex.com/5726061016907776 Generated atoms_info.cpp after change: https://paste.googleplex.com/5540983737417728 Test: bit statsd_test:* Change-Id: I845616f103e013a7927de869b8e8228cfb244090
diff --git a/cmds/statsd/src/state/StateTracker.h b/cmds/statsd/src/state/StateTracker.h index 70f1627..aeca2a5 100644 --- a/cmds/statsd/src/state/StateTracker.h +++ b/cmds/statsd/src/state/StateTracker.h
@@ -74,6 +74,8 @@ int32_t mResetState = kStateUnknown; + const bool mNested; + // Maps primary key to state value info std::unordered_map<HashableDimensionKey, StateValueInfo> mStateMap;