diff options
| author | 2018-03-20 23:31:24 +0000 | |
|---|---|---|
| committer | 2018-03-20 23:31:24 +0000 | |
| commit | 0421c2cf8fcda3c654c224b0f1591effa6833e4e (patch) | |
| tree | 6c49086369775b10d4e83aebba0e3ed42c5a89f2 | |
| parent | ad62f631befe56100bacf24134d3cc42252bc9ce (diff) | |
| parent | 83baaa1212af188db7db547a0a91560d161437a4 (diff) | |
Merge "Fix pulling interval may become 0 in cts" into pi-dev
| -rw-r--r-- | cmds/statsd/src/external/StatsPullerManagerImpl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmds/statsd/src/external/StatsPullerManagerImpl.cpp b/cmds/statsd/src/external/StatsPullerManagerImpl.cpp index 72a00cb6834e..fb0be733bc74 100644 --- a/cmds/statsd/src/external/StatsPullerManagerImpl.cpp +++ b/cmds/statsd/src/external/StatsPullerManagerImpl.cpp @@ -166,6 +166,11 @@ void StatsPullerManagerImpl::RegisterReceiver(int tagId, wp<PullDataReceiver> re // Round it to the nearest minutes. This is the limit of alarm manager. // In practice, we should limit it higher. long roundedIntervalMs = intervalMs/1000/60 * 1000 * 60; + // Scheduled pulling should be at least 1 min apart. + // This can be lower in cts tests, in which case we round it to 1 min. + if (roundedIntervalMs < 60 * 1000) { + roundedIntervalMs = 60 * 1000; + } // There is only one alarm for all pulled events. So only set it to the smallest denom. if (roundedIntervalMs < mCurrentPullingInterval) { VLOG("Updating pulling interval %ld", intervalMs); |