Our system produces data with millisecond precision, from disparate monitoring systems, every 5 minutes. AnomalyDetectionTs() does not really handle data like that properly as-is. The code that tries to figure out what period to use simply hasn't implemented the 'ms' granularity case (nor has it the 'sec' granularity case), and the formatting that is applies in the 'sec' granularity case is never applied to millisecond-precision data making the code blow up on it.
This branch fixes those two problems, though I would suggest rethinking how to detect the 'period' parameter as well (see individual commits for further comments)
Our system produces data with millisecond precision, from disparate monitoring systems, every 5 minutes. AnomalyDetectionTs() does not really handle data like that properly as-is. The code that tries to figure out what period to use simply hasn't implemented the 'ms' granularity case (nor has it the 'sec' granularity case), and the formatting that is applies in the 'sec' granularity case is never applied to millisecond-precision data making the code blow up on it.
This branch fixes those two problems, though I would suggest rethinking how to detect the 'period' parameter as well (see individual commits for further comments)