Loading cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.cpp +3 −2 Original line number Original line Diff line number Diff line Loading @@ -205,11 +205,12 @@ bool MaxDurationTracker::flushCurrentBucket( bool hasPendingEvent = bool hasPendingEvent = false; // has either a kStarted or kPaused event across bucket boundaries false; // has either a kStarted or kPaused event across bucket boundaries // meaning we need to carry them over to the new bucket. // meaning we need to carry them over to the new bucket. for (auto it = mInfos.begin(); it != mInfos.end(); ++it) { for (auto it = mInfos.begin(); it != mInfos.end();) { if (it->second.state == DurationState::kStopped) { if (it->second.state == DurationState::kStopped) { // No need to keep buckets for events that were stopped before. // No need to keep buckets for events that were stopped before. mInfos.erase(it); it = mInfos.erase(it); } else { } else { ++it; hasPendingEvent = true; hasPendingEvent = true; } } } } Loading cmds/statsd/src/packages/UidMap.cpp +2 −1 Original line number Original line Diff line number Diff line Loading @@ -365,7 +365,8 @@ void UidMap::appendUidMap(const int64_t& timestamp, const ConfigKey& key, count++; count++; proto->write(FIELD_TYPE_INT64 | FIELD_ID_SNAPSHOT_TIMESTAMP, proto->write(FIELD_TYPE_INT64 | FIELD_ID_SNAPSHOT_TIMESTAMP, (long long)record.timestampNs); (long long)record.timestampNs); proto->write(FIELD_TYPE_MESSAGE | FIELD_ID_SNAPSHOT_PACKAGE_INFO, record.bytes.data()); proto->write(FIELD_TYPE_MESSAGE | FIELD_ID_SNAPSHOT_PACKAGE_INFO, record.bytes.data(), record.bytes.size()); proto->end(snapshotsToken); proto->end(snapshotsToken); } } } } Loading Loading
cmds/statsd/src/metrics/duration_helper/MaxDurationTracker.cpp +3 −2 Original line number Original line Diff line number Diff line Loading @@ -205,11 +205,12 @@ bool MaxDurationTracker::flushCurrentBucket( bool hasPendingEvent = bool hasPendingEvent = false; // has either a kStarted or kPaused event across bucket boundaries false; // has either a kStarted or kPaused event across bucket boundaries // meaning we need to carry them over to the new bucket. // meaning we need to carry them over to the new bucket. for (auto it = mInfos.begin(); it != mInfos.end(); ++it) { for (auto it = mInfos.begin(); it != mInfos.end();) { if (it->second.state == DurationState::kStopped) { if (it->second.state == DurationState::kStopped) { // No need to keep buckets for events that were stopped before. // No need to keep buckets for events that were stopped before. mInfos.erase(it); it = mInfos.erase(it); } else { } else { ++it; hasPendingEvent = true; hasPendingEvent = true; } } } } Loading
cmds/statsd/src/packages/UidMap.cpp +2 −1 Original line number Original line Diff line number Diff line Loading @@ -365,7 +365,8 @@ void UidMap::appendUidMap(const int64_t& timestamp, const ConfigKey& key, count++; count++; proto->write(FIELD_TYPE_INT64 | FIELD_ID_SNAPSHOT_TIMESTAMP, proto->write(FIELD_TYPE_INT64 | FIELD_ID_SNAPSHOT_TIMESTAMP, (long long)record.timestampNs); (long long)record.timestampNs); proto->write(FIELD_TYPE_MESSAGE | FIELD_ID_SNAPSHOT_PACKAGE_INFO, record.bytes.data()); proto->write(FIELD_TYPE_MESSAGE | FIELD_ID_SNAPSHOT_PACKAGE_INFO, record.bytes.data(), record.bytes.size()); proto->end(snapshotsToken); proto->end(snapshotsToken); } } } } Loading