servo: avoid empty domains after trimming in timelined stats manager

As a result of trimming a list might become empty i.e. have no more
values. If that's the case, then numpy's min/max functions will throw
errors. More importantly: it's meaningless to us if the list is empty
anyways. This change logs when an empty domain list is being generated,
before removing that domain from the data of the stats manager.

TEST=added unittest

Change-Id: Ib61fb18c667241cf12c684a385e524dfb07ea86a
Signed-off-by: Ruben Rodriguez Buchillon <>
Commit-Ready: ChromeOS CL Exonerator Bot <>
Reviewed-by: Mengqi Guo <>
2 files changed