mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:triAGENS/ArangoDB into devel
This commit is contained in:
commit
a863adeeb0
|
@ -107,6 +107,13 @@ std::string const& RestActionHandler::queue () const {
|
||||||
HttpHandler::status_t RestActionHandler::execute () {
|
HttpHandler::status_t RestActionHandler::execute () {
|
||||||
TRI_action_result_t result;
|
TRI_action_result_t result;
|
||||||
|
|
||||||
|
// check the request path
|
||||||
|
if (_request->databaseName() == "_system") {
|
||||||
|
if (TRI_IsPrefixString(_request->requestPath(), "/_admin/aardvark")) {
|
||||||
|
RequestStatisticsAgentSetIgnore(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// need an action
|
// need an action
|
||||||
if (_action == 0) {
|
if (_action == 0) {
|
||||||
generateNotImplemented(_request->requestPath());
|
generateNotImplemented(_request->requestPath());
|
||||||
|
|
|
@ -134,6 +134,8 @@ string const& RestVersionHandler::queue () const {
|
||||||
HttpHandler::status_t RestVersionHandler::execute () {
|
HttpHandler::status_t RestVersionHandler::execute () {
|
||||||
TRI_json_t result;
|
TRI_json_t result;
|
||||||
|
|
||||||
|
RequestStatisticsAgentSetIgnore(this);
|
||||||
|
|
||||||
TRI_InitArray2Json(TRI_CORE_MEM_ZONE, &result, 3);
|
TRI_InitArray2Json(TRI_CORE_MEM_ZONE, &result, 3);
|
||||||
|
|
||||||
TRI_json_t server;
|
TRI_json_t server;
|
||||||
|
|
|
@ -467,6 +467,28 @@ namespace triagens {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief sets ignore flag
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef TRI_ENABLE_FIGURES
|
||||||
|
|
||||||
|
#define RequestStatisticsAgentSetIgnore(a) \
|
||||||
|
do { \
|
||||||
|
if (TRI_ENABLE_STATISTICS) { \
|
||||||
|
if ((a)->RequestStatisticsAgent::_statistics != 0) { \
|
||||||
|
(a)->RequestStatisticsAgent::_statistics->_ignore = true; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
while (0)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define RequestStatisticsAgentSetIgnore(a) while (0)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief adds bytes received
|
/// @brief adds bytes received
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -97,6 +97,7 @@ TRI_request_statistics_t* TRI_AcquireRequestStatistics () {
|
||||||
void TRI_ReleaseRequestStatistics (TRI_request_statistics_t* statistics) {
|
void TRI_ReleaseRequestStatistics (TRI_request_statistics_t* statistics) {
|
||||||
STATISTICS_LOCK(&RequestListLock);
|
STATISTICS_LOCK(&RequestListLock);
|
||||||
|
|
||||||
|
if (! statistics->_ignore) {
|
||||||
TRI_TotalRequestsStatistics.incCounter();
|
TRI_TotalRequestsStatistics.incCounter();
|
||||||
|
|
||||||
if (statistics->_async) {
|
if (statistics->_async) {
|
||||||
|
@ -121,6 +122,7 @@ void TRI_ReleaseRequestStatistics (TRI_request_statistics_t* statistics) {
|
||||||
TRI_BytesSentDistributionStatistics->addFigure(statistics->_sentBytes);
|
TRI_BytesSentDistributionStatistics->addFigure(statistics->_sentBytes);
|
||||||
TRI_BytesReceivedDistributionStatistics->addFigure(statistics->_receivedBytes);
|
TRI_BytesReceivedDistributionStatistics->addFigure(statistics->_receivedBytes);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// clear statistics and put back an the free list
|
// clear statistics and put back an the free list
|
||||||
memset(statistics, 0, sizeof(TRI_request_statistics_t));
|
memset(statistics, 0, sizeof(TRI_request_statistics_t));
|
||||||
|
|
|
@ -80,6 +80,7 @@ typedef struct TRI_request_statistics_s {
|
||||||
bool _async;
|
bool _async;
|
||||||
bool _tooLarge;
|
bool _tooLarge;
|
||||||
bool _executeError;
|
bool _executeError;
|
||||||
|
bool _ignore;
|
||||||
}
|
}
|
||||||
TRI_request_statistics_t;
|
TRI_request_statistics_t;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue