[autotest] Monitor the latency of heartbeat serialize/deserialize

Measure the latency for serializing/deserializing objects in heartbeat
between master and shards, and send the data to statsd server.

Serializing/deserializing Host object could become an overhead in the
future due to its dependency on other objects (epecially, AclGroup and
User), therefore, we should keep an eye on it.

BUG=chromium:448608
TEST=puppylab
DEPLOY=apache

Change-Id: Ic81233de3489d66e1f8287614c09d8b8db944982
Reviewed-on: https://chromium-review.googlesource.com/244849
Reviewed-by: Mungyung Ryu <mkryu@google.com>
Commit-Queue: Mungyung Ryu <mkryu@google.com>
Tested-by: Mungyung Ryu <mkryu@google.com>
2 files changed