From dd03c032166239757c1540d4e770758cbb9f9f7a Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 21 Jul 2015 19:20:37 +0200 Subject: [PATCH] honor --server.disable-statistics for statistics aggregator thread --- arangod/RestServer/ArangoServer.cpp | 1 + lib/Statistics/statistics.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arangod/RestServer/ArangoServer.cpp b/arangod/RestServer/ArangoServer.cpp index 338759b69d..27b2225fd5 100644 --- a/arangod/RestServer/ArangoServer.cpp +++ b/arangod/RestServer/ArangoServer.cpp @@ -791,6 +791,7 @@ int ArangoServer::startupServer () { if (_applicationServer->programOptions().has("no-server")) { startServer = false; + TRI_ENABLE_STATISTICS = false; } // check version diff --git a/lib/Statistics/statistics.cpp b/lib/Statistics/statistics.cpp index 92d5cf298c..1e9ebd9d77 100644 --- a/lib/Statistics/statistics.cpp +++ b/lib/Statistics/statistics.cpp @@ -387,7 +387,7 @@ static uint64_t TRI_GetPhysicalMemory () { //////////////////////////////////////////////////////////////////////////////// static void StatisticsQueueWorker (void* data) { - while (! Shutdown) { + while (! Shutdown && TRI_ENABLE_STATISTICS) { size_t count = ProcessAllRequestStatistics(); if (count == 0) {