From 92a9be2feb0fbad9a124c04e5141a68c3e7afa98 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 23 Sep 2021 09:45:31 +0800 Subject: [PATCH] [TD-6452]: taoskeeper metrics collector phase 1 taosd implementation --- src/plugins/monitor/src/monMain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/monitor/src/monMain.c b/src/plugins/monitor/src/monMain.c index 5a26722c79..4799613268 100644 --- a/src/plugins/monitor/src/monMain.c +++ b/src/plugins/monitor/src/monMain.c @@ -930,7 +930,9 @@ static void monSaveSlowQueryInfo() { } else if (strcmp(fields[i].name, "qid") == 0) { pos += snprintf(sql + pos, SQL_LENGTH, ", \"%s\"", (char *)row[i]); } else if (strcmp(fields[i].name, "created_time") == 0) { - pos += snprintf(sql + pos, SQL_LENGTH, ", %" PRId64 "", *(int64_t *)row[i]); + int64_t create_time = *(int64_t *)row[i]; + create_time = convertTimePrecision(create_time, TSDB_TIME_PRECISION_MILLI, TSDB_TIME_PRECISION_MICRO); + pos += snprintf(sql + pos, SQL_LENGTH, ", %" PRId64 "", create_time); } else if (strcmp(fields[i].name, "time") == 0) { pos += snprintf(sql + pos, SQL_LENGTH, ", %" PRId64 "", *(int64_t *)row[i]); } else if (strcmp(fields[i].name, "ep") == 0) { -- GitLab