From 8314555a500a82d4335e97c23e7d297c99d502db Mon Sep 17 00:00:00 2001 From: rozetko Date: Fri, 7 Dec 2018 10:44:12 +0300 Subject: [PATCH] Convert lastDetectionTime from ns to ms (#305) --- analytics/analytics/detectors/pattern_detector.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/analytics/analytics/detectors/pattern_detector.py b/analytics/analytics/detectors/pattern_detector.py index 564c22b..e363717 100644 --- a/analytics/analytics/detectors/pattern_detector.py +++ b/analytics/analytics/detectors/pattern_detector.py @@ -53,7 +53,8 @@ class PatternDetector(Detector): newCache = detected['cache'] last_dataframe_time = dataframe.iloc[-1]['timestamp'] - last_detection_time = last_dataframe_time.value + # TODO: convert from ns to ms more proper way (not dividing by 10^6) + last_detection_time = last_dataframe_time.value / 1000000 return { 'cache': newCache, 'segments': segments,