8000 suppress statistics warnings (#6894) · mnemosdev/arangodb@ebb4185 · GitHub
[go: up one dir, main page]

Skip to content

Commit ebb4185

Browse files
authored
suppress statistics warnings (arangodb#6894)
1 parent 5b020e4 commit ebb4185

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arangod/Statistics/StatisticsWorker.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ static std::string const fifteenMinuteQuery("FOR s in _statistics FILTER s.time
6464
static std::string const filteredFifteenMinuteQuery("FOR s in _statistics FILTER s.time >= @start FILTER s.clusterId == @clusterId SORT s.time RETURN s");
6565

6666
double extractNumber(VPackSlice slice, char const* attribute) {
67+
if (!slice.isObject()) {
68+
return 0.0;
69+
}
6770
slice = slice.get(attribute);
6871
if (!slice.isNumber()) {
6972
return 0.0;
@@ -409,7 +412,7 @@ void StatisticsWorker::compute15Minute(VPackBuilder& builder, double start) {
409412
clientAvgQueueTime += extractNumber(client, "avgQueueTime");
410413
clientAvgIoTime += extractNumber(client, "avgIoTime");
411414
} catch (std::exception const& ex) {
412-
LOG_TOPIC(WARN, Logger::FIXME) << "caught exception during statistics processing: " << ex.what();
415+
LOG_TOPIC(WARN, Logger::STATISTICS) << "caught exception during statistics processing: " << ex.what();
413416
}
414417
}
415418

0 commit comments

Comments
 (0)
0