From 826c39c74920c0d12c0a29046856c6ef81d4ede4 Mon Sep 17 00:00:00 2001 From: Evgeny Smyshlyaev Date: Tue, 6 Nov 2018 16:00:14 +0300 Subject: [PATCH] Improve timerange logging (#232) --- server/src/controllers/analytics_controller.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/controllers/analytics_controller.ts b/server/src/controllers/analytics_controller.ts index 61059c0..7a2e49e 100644 --- a/server/src/controllers/analytics_controller.ts +++ b/server/src/controllers/analytics_controller.ts @@ -108,7 +108,7 @@ export async function runLearning(id: AnalyticUnit.AnalyticUnitId) { let segmentObjs = segments.map(s => s.toObject()); let { from, to } = getQueryRangeForLearningBySegments(segments); - console.debug(`query metrics from ${analyticUnit.panelUrl}`); + console.debug(`query time range: from ${new Date(from)} to ${new Date(to)}`); let queryResult = await queryByMetric(analyticUnit.metric, analyticUnit.panelUrl, from, to, HASTIC_API_KEY); let data = queryResult.values; if(data.length === 0) { @@ -158,7 +158,7 @@ export async function runPredict(id: AnalyticUnit.AnalyticUnitId) { } let { from, to } = getQueryRangeForLearningBySegments(segments); - console.debug(`query metrics from ${unit.panelUrl}`); + console.debug(`query time range: from ${new Date(from)} to ${new Date(to)}`); let queryResult = await queryByMetric(unit.metric, unit.panelUrl, from, to, HASTIC_API_KEY); let data = queryResult.values; if(data.length === 0) {