Home
last modified time | relevance | path

Searched refs:HashableDimensionKey (Results 1 – 25 of 55) sorted by relevance

123

/frameworks/base/cmds/statsd/src/
DHashableDimensionKey.h44 class HashableDimensionKey {
46 explicit HashableDimensionKey(const std::vector<FieldValue>& values) { in HashableDimensionKey() function
50 HashableDimensionKey() {}; in HashableDimensionKey() function
52 HashableDimensionKey(const HashableDimensionKey& that) : mValues(that.getValues()){}; in HashableDimensionKey() function
77 bool operator!=(const HashableDimensionKey& that) const;
79 bool operator==(const HashableDimensionKey& that) const;
81 bool operator<(const HashableDimensionKey& that) const;
83 bool contains(const HashableDimensionKey& that) const;
91 explicit MetricDimensionKey(const HashableDimensionKey& dimensionKeyInWhat, in MetricDimensionKey()
92 const HashableDimensionKey& stateValuesKey) in MetricDimensionKey()
[all …]
DHashableDimensionKey.cpp105 StatsDimensionsValueParcel HashableDimensionKey::toStatsDimensionsValueParcel() const { in toStatsDimensionsValueParcel()
123 android::hash_t hashDimension(const HashableDimensionKey& value) { in hashDimension()
166 HashableDimensionKey* output) { in filterValues()
183 bool filterPrimaryKey(const std::vector<FieldValue>& values, HashableDimensionKey* output) { in filterPrimaryKey()
213 HashableDimensionKey* conditionDimension) { in getDimensionForCondition()
231 HashableDimensionKey* statePrimaryKey) { in getDimensionForState()
250 bool containsLinkedStateValues(const HashableDimensionKey& whatKey, in containsLinkedStateValues()
251 const HashableDimensionKey& primaryKey, in containsLinkedStateValues()
305 bool HashableDimensionKey::operator!=(const HashableDimensionKey& that) const { in operator !=()
309 bool HashableDimensionKey::operator==(const HashableDimensionKey& that) const { in operator ==()
[all …]
Dstats_util.h27 const HashableDimensionKey DEFAULT_DIMENSION_KEY = HashableDimensionKey();
30 typedef std::map<int64_t, HashableDimensionKey> ConditionKey;
/frameworks/base/cmds/statsd/tests/
DHashableDimensionKey_test.cpp39 HashableDimensionKey whatKey = DEFAULT_DIMENSION_KEY; in TEST()
40 HashableDimensionKey primaryKey; in TEST()
73 HashableDimensionKey whatKey; in TEST()
75 HashableDimensionKey primaryKey; in TEST()
91 HashableDimensionKey whatKey; in TEST()
93 HashableDimensionKey primaryKey; in TEST()
124 HashableDimensionKey whatKey; in TEST()
126 HashableDimensionKey primaryKey; in TEST()
Dmetadata_util_test.cpp28 HashableDimensionKey dim; in TEST()
29 HashableDimensionKey dim2; in TEST()
/frameworks/base/cmds/statsd/src/condition/
DSimpleConditionTracker.h54 virtual const std::set<HashableDimensionKey>* getChangedToTrueDimensions( in getChangedToTrueDimensions()
63 virtual const std::set<HashableDimensionKey>* getChangedToFalseDimensions( in getChangedToFalseDimensions()
74 std::set<HashableDimensionKey>* dimensions) const override { in getTrueSlicedDimensions()
112 std::set<HashableDimensionKey> mLastChangedToTrueDimensions;
113 std::set<HashableDimensionKey> mLastChangedToFalseDimensions;
117 std::map<HashableDimensionKey, int> mSlicedConditionState;
122 void handleConditionEvent(const HashableDimensionKey& outputKey, bool matchStart,
125 bool hitGuardRail(const HashableDimensionKey& newKey);
DConditionWizard.h45 virtual const std::set<HashableDimensionKey>* getChangedToTrueDimensions(const int index) const;
46 virtual const std::set<HashableDimensionKey>* getChangedToFalseDimensions(
57 std::set<HashableDimensionKey>* trueDimensions) const { in getTrueSlicedDimensions()
DCombinationConditionTracker.h50 const std::set<HashableDimensionKey>* getChangedToTrueDimensions( in getChangedToTrueDimensions()
62 const std::set<HashableDimensionKey>* getChangedToFalseDimensions( in getChangedToFalseDimensions()
85 std::set<HashableDimensionKey>* dimensions) const override { in getTrueSlicedDimensions()
DConditionTracker.h104 virtual const std::set<HashableDimensionKey>* getChangedToTrueDimensions(
106 virtual const std::set<HashableDimensionKey>* getChangedToFalseDimensions(
115 std::set<HashableDimensionKey>* dimensions) const = 0;
DConditionWizard.cpp34 const set<HashableDimensionKey>* ConditionWizard::getChangedToTrueDimensions( in getChangedToTrueDimensions()
39 const set<HashableDimensionKey>* ConditionWizard::getChangedToFalseDimensions( in getChangedToFalseDimensions()
/frameworks/base/cmds/statsd/src/state/
DStateTracker.h52 bool getStateValue(const HashableDimensionKey& queryKey, FieldValue* output) const;
69 std::unordered_map<HashableDimensionKey, StateValueInfo> mStateMap;
78 void clearStateForPrimaryKey(const int64_t eventTimeNs, const HashableDimensionKey& primaryKey);
81 void updateStateForPrimaryKey(const int64_t eventTimeNs, const HashableDimensionKey& primaryKey,
86 void notifyListeners(const int64_t eventTimeNs, const HashableDimensionKey& primaryKey,
DStateTracker.cpp35 HashableDimensionKey primaryKey; in onLogEvent()
74 bool StateTracker::getStateValue(const HashableDimensionKey& queryKey, FieldValue* output) const { in getStateValue()
97 const HashableDimensionKey& primaryKey) { in clearStateForPrimaryKey()
99 const std::unordered_map<HashableDimensionKey, StateValueInfo>::iterator it = in clearStateForPrimaryKey()
113 const HashableDimensionKey& primaryKey, in updateStateForPrimaryKey()
167 const HashableDimensionKey& primaryKey, in notifyListeners()
/frameworks/base/cmds/statsd/src/metrics/duration_helper/
DOringDurationTracker.h38 void noteStart(const HashableDimensionKey& key, bool condition, const int64_t eventTime,
40 void noteStop(const HashableDimensionKey& key, const int64_t eventTime,
73 std::unordered_map<HashableDimensionKey, int> mStarted;
74 std::unordered_map<HashableDimensionKey, int> mPaused;
76 std::unordered_map<HashableDimensionKey, ConditionKey> mConditionKeyMap;
79 bool hitGuardRail(const HashableDimensionKey& newKey);
DMaxDurationTracker.h41 void noteStart(const HashableDimensionKey& key, bool condition, const int64_t eventTime,
43 void noteStop(const HashableDimensionKey& key, const int64_t eventTime,
74 std::unordered_map<HashableDimensionKey, DurationInfo> mInfos;
76 void noteConditionChanged(const HashableDimensionKey& key, bool conditionMet,
80 bool hitGuardRail(const HashableDimensionKey& newKey);
DMaxDurationTracker.cpp39 bool MaxDurationTracker::hitGuardRail(const HashableDimensionKey& newKey) { in hitGuardRail()
59 void MaxDurationTracker::noteStart(const HashableDimensionKey& key, bool condition, in noteStart()
93 void MaxDurationTracker::noteStop(const HashableDimensionKey& key, const int64_t eventTime, in noteStop()
155 std::set<HashableDimensionKey> keys; in noteStopAll()
252 void MaxDurationTracker::noteConditionChanged(const HashableDimensionKey& key, bool conditionMet, in noteConditionChanged()
DOringDurationTracker.cpp40 bool OringDurationTracker::hitGuardRail(const HashableDimensionKey& newKey) { in hitGuardRail()
59 void OringDurationTracker::noteStart(const HashableDimensionKey& key, bool condition, in noteStart()
81 void OringDurationTracker::noteStop(const HashableDimensionKey& key, const int64_t timestamp, in noteStop()
229 vector<pair<HashableDimensionKey, int>> startedToPaused; in onSlicedConditionMayChange()
230 vector<pair<HashableDimensionKey, int>> pausedToStarted; in onSlicedConditionMayChange()
453 HashableDimensionKey* stateValuesKey = mEventKey.getMutableStateValuesKey(); in updateCurrentStateKey()
/frameworks/base/cmds/statsd/tests/metrics/
DOringDurationTracker_test.cpp42 const HashableDimensionKey eventKey = getMockedDimensionKey(TagId, 0, "event");
44 const HashableDimensionKey kConditionKey1 = getMockedDimensionKey(TagId, 1, "maps");
45 const HashableDimensionKey kEventKey1 = getMockedDimensionKey(TagId, 2, "maps");
46 const HashableDimensionKey kEventKey2 = getMockedDimensionKey(TagId, 3, "maps");
52 const HashableDimensionKey kEventKey1 = getMockedDimensionKey(TagId, 2, "maps"); in TEST()
53 const HashableDimensionKey kEventKey2 = getMockedDimensionKey(TagId, 3, "maps"); in TEST()
84 const HashableDimensionKey kEventKey1 = getMockedDimensionKey(TagId, 2, "maps"); in TEST()
85 const HashableDimensionKey kEventKey2 = getMockedDimensionKey(TagId, 3, "maps"); in TEST()
113 const std::vector<HashableDimensionKey> kConditionKey1 = in TEST()
115 const HashableDimensionKey kEventKey1 = getMockedDimensionKey(TagId, 2, "maps"); in TEST()
[all …]
Dmetrics_test_helper.cpp21 HashableDimensionKey getMockedDimensionKey(int tagId, int key, string value) { in getMockedDimensionKey()
22 HashableDimensionKey dimension; in getMockedDimensionKey()
29 HashableDimensionKey getMockedDimensionKeyLongValue(int tagId, int key, int64_t value) { in getMockedDimensionKeyLongValue()
30 HashableDimensionKey dimension; in getMockedDimensionKeyLongValue()
DMaxDurationTracker_test.cpp44 const HashableDimensionKey eventKey = getMockedDimensionKey(TagId, 0, "1");
45 const HashableDimensionKey conditionKey = getMockedDimensionKey(TagId, 4, "1");
46 const HashableDimensionKey key1 = getMockedDimensionKey(TagId, 1, "1");
47 const HashableDimensionKey key2 = getMockedDimensionKey(TagId, 1, "2");
52 const HashableDimensionKey key1 = getMockedDimensionKey(TagId, 1, "1"); in TEST()
53 const HashableDimensionKey key2 = getMockedDimensionKey(TagId, 1, "2"); in TEST()
86 const HashableDimensionKey key1 = getMockedDimensionKey(TagId, 1, "1"); in TEST()
87 const HashableDimensionKey key2 = getMockedDimensionKey(TagId, 1, "2"); in TEST()
121 const HashableDimensionKey key1 = getMockedDimensionKey(TagId, 1, "1"); in TEST()
122 const HashableDimensionKey key2 = getMockedDimensionKey(TagId, 1, "2"); in TEST()
[all …]
Dmetrics_test_helper.h52 HashableDimensionKey getMockedDimensionKey(int tagId, int key, std::string value);
55 HashableDimensionKey getMockedDimensionKeyLongValue(int tagId, int key, int64_t value);
/frameworks/base/cmds/statsd/tests/state/
DStateTracker_test.cpp46 Update(const HashableDimensionKey& key, int state) : mKey(key), mState(state){}; in Update()
47 HashableDimensionKey mKey;
54 const HashableDimensionKey& primaryKey, const FieldValue& oldState, in onStateChanged()
60 int getStateInt(StateManager& mgr, int atomId, const HashableDimensionKey& queryKey) { in getStateInt()
132 HashableDimensionKey queryKey = DEFAULT_DIMENSION_KEY; in TEST()
353 HashableDimensionKey queryKey = DEFAULT_DIMENSION_KEY; in TEST()
378 HashableDimensionKey queryKey; in TEST()
408 HashableDimensionKey queryKey; in TEST()
414 HashableDimensionKey queryKey2; in TEST()
420 HashableDimensionKey queryKey3; in TEST()
[all …]
/frameworks/base/cmds/statsd/src/metrics/
DValueMetricProducer.h93 void onStateChanged(int64_t eventTimeNs, int32_t atomId, const HashableDimensionKey& primaryKey,
100 const std::map<int, HashableDimensionKey>& statePrimaryKeys) override;
165 std::set<HashableDimensionKey> mMatchedMetricDimensionKeys;
168 pair<int32_t, HashableDimensionKey> mStateChangePrimaryKey;
197 HashableDimensionKey currentState;
204 std::unordered_map<HashableDimensionKey, std::vector<BaseInfo>> mCurrentBaseInfo;
DMetricProducer.cpp101 std::map<int32_t, HashableDimensionKey> statePrimaryKeys; in onMatchedLogEventLocked()
119 HashableDimensionKey stateValuesKey; in onMatchedLogEventLocked()
134 HashableDimensionKey dimensionInWhat; in onMatchedLogEventLocked()
269 void MetricProducer::queryStateValue(const int32_t atomId, const HashableDimensionKey& queryKey, in queryStateValue()
297 HashableDimensionKey MetricProducer::getUnknownStateKey() { in getUnknownStateKey()
298 HashableDimensionKey stateKey; in getUnknownStateKey()
DDurationMetricProducer.cpp164 const HashableDimensionKey& primaryKey, in onStateChanged()
239 std::set<HashableDimensionKey> trueConditionDimensions; in onSlicedConditionMayChangeLocked_opt1()
242 HashableDimensionKey linkedConditionDimensionKey; in onSlicedConditionMayChangeLocked_opt1()
254 HashableDimensionKey linkedConditionDimensionKey; in onSlicedConditionMayChangeLocked_opt1()
525 HashableDimensionKey dimensionKey = DEFAULT_DIMENSION_KEY; in handleStartEvent()
536 const map<int, HashableDimensionKey>& statePrimaryKeys) { in onMatchedLogEventInternalLocked()
559 HashableDimensionKey dimensionInWhat = DEFAULT_DIMENSION_KEY; in onMatchedLogEventLocked()
566 std::map<int, HashableDimensionKey> statePrimaryKeys; in onMatchedLogEventLocked()
584 HashableDimensionKey stateValuesKey = DEFAULT_DIMENSION_KEY; in onMatchedLogEventLocked()
609 HashableDimensionKey internalDimensionKey = DEFAULT_DIMENSION_KEY; in onMatchedLogEventLocked()
DDurationMetricProducer.h58 const HashableDimensionKey& primaryKey, const FieldValue& oldState,
67 const std::map<int, HashableDimensionKey>& statePrimaryKeys) override;
139 std::unordered_map<HashableDimensionKey, std::unique_ptr<DurationTracker>>

123