OSDN Git Service

Modifies statsd output for start and end times.
authorDavid Chen <dwchen@google.com>
Fri, 2 Feb 2018 02:27:51 +0000 (18:27 -0800)
committerDavid Chen <dwchen@google.com>
Thu, 8 Feb 2018 17:59:45 +0000 (09:59 -0800)
commit16049578001364e1fcb0f10d6f94868081e57316
treeed3c22c00ead5d9ba9ee4bb8c957ae3f7e5e3b9d
parent171951d8e0bc09dc6882b3c97c17dc7ebb7dc636
Modifies statsd output for start and end times.

We include the start of when the last dump occurred and the current
timestamp. These timestamps are shared across all metrics, so
there's no advantage in duplicating these numbers across all metrics.

Also, we should use elapsed realtime instead of times based on wall
clock, which can jump around and go backwards.

Test: Test that statsd can still build and
adb shell cmd stats dump-report doesn't crash.
Change-Id: I819e5643cee75dfa3e78a58f94c9d61ededa78d7
cmds/statsd/src/StatsLogProcessor.cpp
cmds/statsd/src/metrics/CountMetricProducer.cpp
cmds/statsd/src/metrics/DurationMetricProducer.cpp
cmds/statsd/src/metrics/EventMetricProducer.cpp
cmds/statsd/src/metrics/GaugeMetricProducer.cpp
cmds/statsd/src/metrics/MetricsManager.cpp
cmds/statsd/src/metrics/MetricsManager.h
cmds/statsd/src/metrics/ValueMetricProducer.cpp
cmds/statsd/src/stats_log.proto
cmds/statsd/tools/dogfood/src/com/android/statsd/dogfood/DisplayProtoUtils.java
cmds/statsd/tools/loadtest/src/com/android/statsd/loadtest/DisplayProtoUtils.java