summaryrefslogtreecommitdiff
path: root/cmds/statsd/src/shell/ShellSubscriber.cpp
diff options
context:
space:
mode:
authorChenjie Yu <cjyu@google.com>2018-12-16 07:37:04 -0800
committerChenjie Yu <cjyu@google.com>2018-12-21 09:46:09 -0800
commit0bd73dbaac5fee840f443f287f7bf027c4eb5926 (patch)
treeeda01942b0981ae021e0a23b4a57c4e39025706a /cmds/statsd/src/shell/ShellSubscriber.cpp
parentb7fc056068a8d146c99a8e6932ba7034a7b0bd22 (diff)
Puller refactor
1) Refactor pullers and add tests. 2) Add timeout to a puller. mPullTimeoutNs is intrinsic to puller. A pull taking longer than this is deemed failed and the data discarded. A metric or StatsPullerManager requesting a pull should monitor the pull and have deadlineNs. A successful pull may come later than desired due to statsd processing delays. 3) Add unit tests to puller now that the base puller is more complicated. Bug: 118756964 Test: unit test Change-Id: I0e5d47e2527391f7beef4b2d06bfd5c2f82f1179
Diffstat (limited to 'cmds/statsd/src/shell/ShellSubscriber.cpp')
-rw-r--r--cmds/statsd/src/shell/ShellSubscriber.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmds/statsd/src/shell/ShellSubscriber.cpp b/cmds/statsd/src/shell/ShellSubscriber.cpp
index dffff7a96269..22883f3c205a 100644
--- a/cmds/statsd/src/shell/ShellSubscriber.cpp
+++ b/cmds/statsd/src/shell/ShellSubscriber.cpp
@@ -131,8 +131,7 @@ void ShellSubscriber::startPull(int64_t token, int64_t intervalMillis) {
VLOG("pull atom %d now", pullInfo.mPullerMatcher.atom_id());
vector<std::shared_ptr<LogEvent>> data;
- mPullerMgr->Pull(pullInfo.mPullerMatcher.atom_id(), nowMillis * 1000000L,
- &data);
+ mPullerMgr->Pull(pullInfo.mPullerMatcher.atom_id(), &data);
VLOG("pulled %zu atoms", data.size());
if (data.size() > 0) {
writeToOutputLocked(data, pullInfo.mPullerMatcher);