mirror of https://gitee.com/bigwinds/arangodb
Output http replies if verbose set and an error occurs.
This commit is contained in:
parent
0988508e33
commit
a775c410b0
|
@ -77,7 +77,8 @@ namespace triagens {
|
|||
double connectTimeout,
|
||||
uint32_t sslProtocol,
|
||||
bool keepAlive,
|
||||
bool async)
|
||||
bool async,
|
||||
bool verbose)
|
||||
: Thread("arangob"),
|
||||
_operation(operation),
|
||||
_startCondition(condition),
|
||||
|
@ -100,7 +101,8 @@ namespace triagens {
|
|||
_connection(0),
|
||||
_offset(0),
|
||||
_counter(0),
|
||||
_time(0.0) {
|
||||
_time(0.0),
|
||||
_verbose(verbose) {
|
||||
|
||||
_errorHeader = StringUtils::tolower(rest::HttpResponse::getBatchErrorHeader());
|
||||
}
|
||||
|
@ -339,6 +341,9 @@ namespace triagens {
|
|||
_warningCount++;
|
||||
if (_warningCount < MaxWarnings) {
|
||||
LOG_WARNING("Server side warning count: %lu", errorCount);
|
||||
if (_verbose) {
|
||||
LOG_WARNING("Server reply: %s", result->getBody().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -572,6 +577,12 @@ namespace triagens {
|
|||
|
||||
static const int MaxWarnings = 5;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief output replies if error count in http relpy > 0
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
bool _verbose;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,12 +139,19 @@ static bool Progress = true;
|
|||
|
||||
static string TestCase = "version";
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief print out replies on error
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static bool verbose = false;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief includes all the test cases
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "Benchmark/test-cases.h"
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- private functions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
@ -194,6 +201,7 @@ static void ParseProgramOptions (int argc, char* argv[]) {
|
|||
("complexity", &Complexity, "complexity parameter for the test")
|
||||
("delay", &Delay, "use a startup delay (necessary only when run in series)")
|
||||
("progress", &Progress, "show progress")
|
||||
("verbose", &verbose, "print out replies if the http-header indicates db-errors")
|
||||
;
|
||||
|
||||
BaseClient.setupGeneral(description);
|
||||
|
@ -355,7 +363,8 @@ int main (int argc, char* argv[]) {
|
|||
BaseClient.connectTimeout(),
|
||||
BaseClient.sslProtocol(),
|
||||
KeepAlive,
|
||||
Async);
|
||||
Async,
|
||||
verbose);
|
||||
|
||||
threads.push_back(thread);
|
||||
thread->setOffset((size_t) (i * realStep));
|
||||
|
|
Loading…
Reference in New Issue