mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
PerformanceTest fix --secure (#3690)
* fix * PerformanceTest fix --secure * clean
This commit is contained in:
parent
624a9ac0af
commit
c5eb678187
@ -80,7 +80,6 @@ public:
|
||||
|
||||
void initialize(Poco::Util::Application & self)
|
||||
{
|
||||
Poco::Util::Application::initialize(self);
|
||||
std::string home_path;
|
||||
const char * home_path_cstr = getenv("HOME");
|
||||
if (home_path_cstr)
|
||||
@ -447,7 +446,7 @@ int mainEntryClickHouseBenchmark(int argc, char ** argv)
|
||||
("json", value<std::string>()->default_value(""), "write final report to specified file in JSON format")
|
||||
("host,h", value<std::string>()->default_value("localhost"), "")
|
||||
("port", value<UInt16>()->default_value(9000), "")
|
||||
("secure", "Use TLS connection")
|
||||
("secure,s", "Use TLS connection")
|
||||
("user", value<std::string>()->default_value("default"), "")
|
||||
("password", value<std::string>()->default_value(""), "")
|
||||
("database", value<std::string>()->default_value("default"), "")
|
||||
|
@ -30,7 +30,9 @@
|
||||
#include <Poco/SAX/InputSource.h>
|
||||
#include <Poco/Util/XMLConfiguration.h>
|
||||
#include <Poco/XML/XMLStream.h>
|
||||
#include <Poco/Util/Application.h>
|
||||
#include <Common/InterruptListener.h>
|
||||
#include <Common/Config/configReadClient.h>
|
||||
|
||||
#ifndef __clang__
|
||||
#pragma GCC optimize("-fno-var-tracking-assignments")
|
||||
@ -487,7 +489,7 @@ struct Stats
|
||||
double Stats::avg_rows_speed_precision = 0.001;
|
||||
double Stats::avg_bytes_speed_precision = 0.001;
|
||||
|
||||
class PerformanceTest
|
||||
class PerformanceTest : public Poco::Util::Application
|
||||
{
|
||||
public:
|
||||
using Strings = std::vector<String>;
|
||||
@ -524,7 +526,19 @@ public:
|
||||
{
|
||||
throw DB::Exception("No tests were specified", DB::ErrorCodes::BAD_ARGUMENTS);
|
||||
}
|
||||
}
|
||||
|
||||
void initialize(Poco::Util::Application & self)
|
||||
{
|
||||
std::string home_path;
|
||||
const char * home_path_cstr = getenv("HOME");
|
||||
if (home_path_cstr)
|
||||
home_path = home_path_cstr;
|
||||
configReadClient(Poco::Util::Application::instance().config(), home_path);
|
||||
}
|
||||
|
||||
int main(const std::vector < std::string > & /* args */)
|
||||
{
|
||||
std::string name;
|
||||
UInt64 version_major;
|
||||
UInt64 version_minor;
|
||||
@ -1390,7 +1404,7 @@ try
|
||||
("profiles-file", value<String>()->default_value(""), "Specify a file with global profiles")
|
||||
("host,h", value<String>()->default_value("localhost"), "")
|
||||
("port", value<UInt16>()->default_value(9000), "")
|
||||
("secure", "Use TLS connection")
|
||||
("secure,s", "Use TLS connection")
|
||||
("database", value<String>()->default_value("default"), "")
|
||||
("user", value<String>()->default_value("default"), "")
|
||||
("password", value<String>()->default_value(""), "")
|
||||
@ -1482,7 +1496,7 @@ try
|
||||
|
||||
DB::UseSSL use_ssl;
|
||||
|
||||
DB::PerformanceTest performanceTest(
|
||||
DB::PerformanceTest performance_test(
|
||||
options["host"].as<String>(),
|
||||
options["port"].as<UInt16>(),
|
||||
options.count("secure"),
|
||||
@ -1499,8 +1513,7 @@ try
|
||||
std::move(tests_names_regexp),
|
||||
std::move(skip_names_regexp),
|
||||
timeouts);
|
||||
|
||||
return 0;
|
||||
return performance_test.run();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user