diff options
author | 2019-07-25 11:12:39 -0700 | |
---|---|---|
committer | 2019-08-05 16:13:07 -0700 | |
commit | 3d3fa52c8bbe481ffb87d75e24725444bef0b939 (patch) | |
tree | 20ac43f46ed45fe58e07271234a9db28ce964724 /services/inputflinger/InputReader.cpp | |
parent | 8384682fd25b54921fd74288788f2a9299dd8dba (diff) |
Move LatencyStatistics collection from InputReader to InputTransport
This move allows us to grab a bigger context of how much time a motion
event is spent from the kernel to right before the event was published.
Test: Modified LatencyStats to report ever 10 seconds. Utilized logs to
check that logs were reporting every 10 seconds. Checked also using
logs that data was being added and calculated correctly.
Change-Id: Iee0f9a2155e93ae77de5a5cd8b9fd1506186c60f
Signed-off-by: Atif Niyaz <atifniyaz@google.com>
Diffstat (limited to 'services/inputflinger/InputReader.cpp')
-rw-r--r-- | services/inputflinger/InputReader.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp index df5dcafec9..d565e3ab38 100644 --- a/services/inputflinger/InputReader.cpp +++ b/services/inputflinger/InputReader.cpp @@ -57,7 +57,6 @@ #include <android-base/stringprintf.h> #include <input/Keyboard.h> #include <input/VirtualKeyMap.h> -#include <statslog.h> #define INDENT " " #define INDENT2 " " @@ -4310,24 +4309,12 @@ void TouchInputMapper::clearStylusDataPendingFlags() { mExternalStylusFusionTimeout = LLONG_MAX; } -void TouchInputMapper::reportEventForStatistics(nsecs_t evdevTime) { - if (mStatistics.shouldReport()) { - android::util::stats_write(android::util::TOUCH_EVENT_REPORTED, mStatistics.getMin(), - mStatistics.getMax(), mStatistics.getMean(), - mStatistics.getStDev(), mStatistics.getCount()); - mStatistics.reset(); - } - nsecs_t latency = nanoseconds_to_microseconds(systemTime(CLOCK_MONOTONIC) - evdevTime); - mStatistics.addValue(latency); -} - void TouchInputMapper::process(const RawEvent* rawEvent) { mCursorButtonAccumulator.process(rawEvent); mCursorScrollAccumulator.process(rawEvent); mTouchButtonAccumulator.process(rawEvent); if (rawEvent->type == EV_SYN && rawEvent->code == SYN_REPORT) { - reportEventForStatistics(rawEvent->when); sync(rawEvent->when); } } |