mirror of https://gitee.com/bigwinds/arangodb
better log facilities for debugging statistics
This commit is contained in:
parent
c1db7228c7
commit
1f29e2de81
|
@ -40,6 +40,59 @@ thread_local TRI_request_statistics_t* TRI_request_statistics_t::STATS =
|
||||||
|
|
||||||
static size_t const QUEUE_SIZE = 1000;
|
static size_t const QUEUE_SIZE = 1000;
|
||||||
|
|
||||||
|
std::string TRI_request_statistics_t::to_string(){
|
||||||
|
std::stringstream ss;
|
||||||
|
ss << std::boolalpha << std::setprecision(20) << "statistics "
|
||||||
|
<< std::endl
|
||||||
|
<< "_readStart " << _readStart << std::endl
|
||||||
|
<< "_readEnd " << _readEnd << std::endl
|
||||||
|
<< "_queueStart " << _queueStart << std::endl
|
||||||
|
<< "_queueEnd " << _queueEnd << std::endl
|
||||||
|
<< "_requestStart " << _requestStart << std::endl
|
||||||
|
<< "_requestEnd " << _requestEnd << std::endl
|
||||||
|
<< "_writeStart " << _writeStart << std::endl
|
||||||
|
<< "_writeEnd " << _writeEnd << std::endl
|
||||||
|
<< "_receivedBytes " << _receivedBytes << std::endl
|
||||||
|
<< "_sentBytes " << _sentBytes << std::endl
|
||||||
|
<< "_async " << _async << std::endl
|
||||||
|
<< "_tooLarge " << _tooLarge << std::endl
|
||||||
|
<< "_executeError " << _executeError << std::endl
|
||||||
|
<< "_ignore " << _ignore << std::endl;
|
||||||
|
|
||||||
|
return ss.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TRI_request_statistics_t::trace_log(){
|
||||||
|
LOG_TOPIC(TRACE, Logger::REQUESTS) << std::boolalpha << std::setprecision(20)
|
||||||
|
<< "_readStart " << _readStart;
|
||||||
|
LOG_TOPIC(TRACE, Logger::REQUESTS) << std::boolalpha << std::setprecision(20)
|
||||||
|
<< "_readEnd " << _readEnd;
|
||||||
|
LOG_TOPIC(TRACE, Logger::REQUESTS) << std::boolalpha << std::setprecision(20)
|
||||||
|
<< "_queueStart " << _queueStart;
|
||||||
|
LOG_TOPIC(TRACE, Logger::REQUESTS) << std::boolalpha << std::setprecision(20)
|
||||||
|
<< "_queueEnd " << _queueEnd;
|
||||||
|
LOG_TOPIC(TRACE, Logger::REQUESTS) << std::boolalpha << std::setprecision(20)
|
||||||
|
<< "_requestStart " << _requestStart;
|
||||||
|
LOG_TOPIC(TRACE, Logger::REQUESTS) << std::boolalpha << std::setprecision(20)
|
||||||
|
<< "_requestEnd " << _requestEnd;
|
||||||
|
LOG_TOPIC(TRACE, Logger::REQUESTS) << std::boolalpha << std::setprecision(20)
|
||||||
|
<< "_writeStart " << _writeStart;
|
||||||
|
LOG_TOPIC(TRACE, Logger::REQUESTS) << std::boolalpha << std::setprecision(20)
|
||||||
|
<< "_writeEnd " << _writeEnd;
|
||||||
|
LOG_TOPIC(TRACE, Logger::REQUESTS) << std::boolalpha << std::setprecision(20)
|
||||||
|
<< "_receivedBytes " << _receivedBytes;
|
||||||
|
LOG_TOPIC(TRACE, Logger::REQUESTS) << std::boolalpha << std::setprecision(20)
|
||||||
|
<< "_sentBytes " << _sentBytes;
|
||||||
|
LOG_TOPIC(TRACE, Logger::REQUESTS) << std::boolalpha << std::setprecision(20)
|
||||||
|
<< "_async " << _async;
|
||||||
|
LOG_TOPIC(TRACE, Logger::REQUESTS) << std::boolalpha << std::setprecision(20)
|
||||||
|
<< "_tooLarge " << _tooLarge;
|
||||||
|
LOG_TOPIC(TRACE, Logger::REQUESTS) << std::boolalpha << std::setprecision(20)
|
||||||
|
<< "_executeError " << _executeError;
|
||||||
|
LOG_TOPIC(TRACE, Logger::REQUESTS) << std::boolalpha << std::setprecision(20)
|
||||||
|
<< "_ignore " << _ignore;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief lock for request statistics data
|
/// @brief lock for request statistics data
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -80,27 +80,8 @@ struct TRI_request_statistics_t {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string to_string() {
|
std::string to_string();
|
||||||
std::stringstream ss;
|
void trace_log();
|
||||||
ss << std::boolalpha << std::setprecision(20) << "statistics "
|
|
||||||
<< std::endl
|
|
||||||
<< "_readStart " << _readStart << std::endl
|
|
||||||
<< "_readEnd " << _readEnd << std::endl
|
|
||||||
<< "_queueStart " << _queueStart << std::endl
|
|
||||||
<< "_queueEnd " << _queueEnd << std::endl
|
|
||||||
<< "_requestStart " << _requestStart << std::endl
|
|
||||||
<< "_requestEnd " << _requestEnd << std::endl
|
|
||||||
<< "_writeStart " << _writeStart << std::endl
|
|
||||||
<< "_writeEnd " << _writeEnd << std::endl
|
|
||||||
<< "_receivedBytes " << _receivedBytes << std::endl
|
|
||||||
<< "_sentBytes " << _sentBytes << std::endl
|
|
||||||
<< "_async " << _async << std::endl
|
|
||||||
<< "_tooLarge " << _tooLarge << std::endl
|
|
||||||
<< "_executeError " << _executeError << std::endl
|
|
||||||
<< "_ignore " << _ignore << std::endl;
|
|
||||||
|
|
||||||
return ss.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
double _readStart; // CommTask::processRead - read first byte of message
|
double _readStart; // CommTask::processRead - read first byte of message
|
||||||
double _readEnd; // CommTask::processRead - message complete
|
double _readEnd; // CommTask::processRead - message complete
|
||||||
|
|
Loading…
Reference in New Issue