Be specific with imports in Monitoring.Server

Signed-off-by: Aaron Karper <akarper@google.com>
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>
Add documentation for cpuavgloadWindowSize

There is no documentation for this constant, especially the unit it is
measured in is unclear.

Signed-off-by: Aaron Karper <akarper@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Use more precise time measurement in DataCollectors

Specifically microseconds since the epoch are used. This also involves
better type safety because the ClockTime type is used.

Signed-off-by: Aaron Karper <akarper@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Simplify parts related to MonD

* Flatten logic of CPUload.dcReport collector
* Using forever instead of unconditional recursion
* Simplify config access

Signed-off-by: Aaron Karper <akarper@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
Don't give completely wrong cpu load without datapoints

No reasonable number can be given if only one datapoint is available,
but the previous logic returned -3*1023. This fix returns an error.

Signed-off-by: Aaron Karper <akarper@google.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>