mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge remote-tracking branch 'upstream/master' into fix15
This commit is contained in:
commit
b6aac05f87
@ -43,8 +43,10 @@ namespace fs = boost::filesystem;
|
||||
|
||||
PerformanceTestInfo::PerformanceTestInfo(
|
||||
XMLConfigurationPtr config,
|
||||
const std::string & profiles_file_)
|
||||
const std::string & profiles_file_,
|
||||
const Settings & global_settings_)
|
||||
: profiles_file(profiles_file_)
|
||||
, settings(global_settings_)
|
||||
{
|
||||
test_name = config->getString("name");
|
||||
path = config->getString("path");
|
||||
|
@ -26,7 +26,7 @@ using StringToVector = std::map<std::string, Strings>;
|
||||
class PerformanceTestInfo
|
||||
{
|
||||
public:
|
||||
PerformanceTestInfo(XMLConfigurationPtr config, const std::string & profiles_file_);
|
||||
PerformanceTestInfo(XMLConfigurationPtr config, const std::string & profiles_file_, const Settings & global_settings_);
|
||||
|
||||
std::string test_name;
|
||||
std::string path;
|
||||
@ -34,12 +34,12 @@ public:
|
||||
|
||||
Strings queries;
|
||||
|
||||
std::string profiles_file;
|
||||
Settings settings;
|
||||
ExecutionType exec_type;
|
||||
StringToVector substitutions;
|
||||
size_t times_to_run;
|
||||
|
||||
std::string profiles_file;
|
||||
std::vector<TestStopConditions> stop_conditions_by_run;
|
||||
|
||||
Strings create_queries;
|
||||
|
@ -91,16 +91,6 @@ public:
|
||||
throw Exception("No tests were specified", ErrorCodes::BAD_ARGUMENTS);
|
||||
}
|
||||
|
||||
/// This functionality seems strange.
|
||||
//void initialize(Poco::Util::Application & self [[maybe_unused]])
|
||||
//{
|
||||
// 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 run()
|
||||
{
|
||||
std::string name;
|
||||
@ -120,6 +110,10 @@ public:
|
||||
|
||||
return 0;
|
||||
}
|
||||
void setContextSetting(const String & name, const std::string & value)
|
||||
{
|
||||
global_context.setSetting(name, value);
|
||||
}
|
||||
|
||||
private:
|
||||
Connection connection;
|
||||
@ -201,7 +195,7 @@ private:
|
||||
|
||||
std::pair<std::string, bool> runTest(XMLConfigurationPtr & test_config)
|
||||
{
|
||||
PerformanceTestInfo info(test_config, profiles_file);
|
||||
PerformanceTestInfo info(test_config, profiles_file, global_context.getSettingsRef());
|
||||
LOG_INFO(log, "Config for test '" << info.test_name << "' parsed");
|
||||
PerformanceTest current(test_config, connection, interrupt_listener, info, global_context, query_indexes[info.path]);
|
||||
|
||||
@ -330,6 +324,7 @@ try
|
||||
using Strings = DB::Strings;
|
||||
|
||||
|
||||
#define DECLARE_SETTING(TYPE, NAME, DEFAULT, DESCRIPTION) (#NAME, po::value<std::string>(), DESCRIPTION)
|
||||
po::options_description desc("Allowed options");
|
||||
desc.add_options()
|
||||
("help", "produce help message")
|
||||
@ -350,7 +345,10 @@ try
|
||||
("skip-names-regexp", value<Strings>()->multitoken(), "Do not run tests with names matching regexp")
|
||||
("input-files", value<Strings>()->multitoken(), "Input .xml files")
|
||||
("query-indexes", value<std::vector<size_t>>()->multitoken(), "Input query indexes")
|
||||
("recursive,r", "Recurse in directories to find all xml's");
|
||||
("recursive,r", "Recurse in directories to find all xml's")
|
||||
APPLY_FOR_SETTINGS(DECLARE_SETTING);
|
||||
#undef DECLARE_SETTING
|
||||
|
||||
|
||||
po::options_description cmdline_options;
|
||||
cmdline_options.add(desc);
|
||||
@ -408,6 +406,15 @@ try
|
||||
std::move(skip_names_regexp),
|
||||
queries_with_indexes,
|
||||
timeouts);
|
||||
/// Extract settings from the options.
|
||||
#define EXTRACT_SETTING(TYPE, NAME, DEFAULT, DESCRIPTION) \
|
||||
if (options.count(#NAME)) \
|
||||
{ \
|
||||
performance_test_suite.setContextSetting(#NAME, options[#NAME].as<std::string>()); \
|
||||
}
|
||||
APPLY_FOR_SETTINGS(EXTRACT_SETTING)
|
||||
#undef EXTRACT_SETTING
|
||||
|
||||
return performance_test_suite.run();
|
||||
}
|
||||
catch (...)
|
||||
|
@ -28,7 +28,7 @@ ClickHouse can be directly used by all sorts of either analysts and engineers, s
|
||||
* Try to avoid slang, use the most common and specific terms for everythings. If some terms are used as synonyms, state this explicitly.
|
||||
* All functionality descriptions should be accompanied by examples. At least very basic ones, but real world examples are welcome too.
|
||||
* Debatable topics like politics, religion, racial and so on are strictly prohibited in either documentation, examples, comments and code.
|
||||
* People tend to get temporary stuck with some specific words or phrases, usually auxiliary, for a shord period of time. So they get repeated over and over in small part of content, which looks weird when reading. It is easy to fix this by reading your text again before publishing, also you can use this opportunity to fix mistypes and lost punctuation.
|
||||
* People tend to get temporary stuck with some specific words or phrases, usually auxiliary, for a short period of time. So they get repeated over and over in small part of content, which looks weird when reading. It is easy to fix this by reading your text again before publishing, also you can use this opportunity to fix mistypes and lost punctuation.
|
||||
* Try to avoid naming the reader in text, it is not strictly prohibited though.
|
||||
|
||||
# How to start translation to new language
|
||||
|
@ -11,7 +11,7 @@ In a "normal" row-oriented DBMS, data is stored in this order:
|
||||
| #2 | 89953706054 | 1 | Mission | 1 | 2016-05-18 07:38:00 |
|
||||
| #N | ... | ... | ... | ... | ... |
|
||||
|
||||
In order words, all the values related to a row are physically stored next to each other.
|
||||
In other words, all the values related to a row are physically stored next to each other.
|
||||
|
||||
Examples of a row-oriented DBMS are MySQL, Postgres, and MS SQL Server.
|
||||
{: .grey }
|
||||
|
Loading…
Reference in New Issue
Block a user