2019-01-25 18:35:16 +00:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <map>
|
2019-03-22 12:08:30 +00:00
|
|
|
#include <Core/Settings.h>
|
2019-01-25 18:35:16 +00:00
|
|
|
#include <Poco/Util/XMLConfiguration.h>
|
|
|
|
#include <Poco/AutoPtr.h>
|
|
|
|
|
|
|
|
#include "StopConditionsSet.h"
|
|
|
|
#include "TestStopConditions.h"
|
|
|
|
#include "TestStats.h"
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
enum class ExecutionType
|
|
|
|
{
|
|
|
|
Loop,
|
|
|
|
Once
|
|
|
|
};
|
|
|
|
|
|
|
|
using XMLConfiguration = Poco::Util::XMLConfiguration;
|
|
|
|
using XMLConfigurationPtr = Poco::AutoPtr<XMLConfiguration>;
|
2019-01-28 16:20:29 +00:00
|
|
|
using StringToVector = std::map<std::string, Strings>;
|
2019-01-25 18:35:16 +00:00
|
|
|
|
2019-01-28 16:20:29 +00:00
|
|
|
/// Class containing all info to run performance test
|
2019-01-25 18:35:16 +00:00
|
|
|
class PerformanceTestInfo
|
|
|
|
{
|
|
|
|
public:
|
2020-01-07 09:10:36 +00:00
|
|
|
PerformanceTestInfo(XMLConfigurationPtr config, const Settings & global_settings_);
|
2019-01-25 18:35:16 +00:00
|
|
|
|
|
|
|
std::string test_name;
|
2019-01-31 13:46:43 +00:00
|
|
|
std::string path;
|
2019-01-25 18:35:16 +00:00
|
|
|
|
2019-01-28 16:20:29 +00:00
|
|
|
Strings queries;
|
2019-01-25 18:35:16 +00:00
|
|
|
|
|
|
|
Settings settings;
|
|
|
|
ExecutionType exec_type;
|
|
|
|
StringToVector substitutions;
|
|
|
|
size_t times_to_run;
|
2019-01-28 16:20:29 +00:00
|
|
|
|
2019-01-25 18:35:16 +00:00
|
|
|
std::vector<TestStopConditions> stop_conditions_by_run;
|
|
|
|
|
2019-05-21 12:57:19 +00:00
|
|
|
Strings create_and_fill_queries;
|
2019-02-01 15:10:13 +00:00
|
|
|
Strings drop_queries;
|
|
|
|
|
2019-01-25 18:35:16 +00:00
|
|
|
private:
|
|
|
|
void applySettings(XMLConfigurationPtr config);
|
|
|
|
void extractQueries(XMLConfigurationPtr config);
|
|
|
|
void processSubstitutions(XMLConfigurationPtr config);
|
|
|
|
void getExecutionType(XMLConfigurationPtr config);
|
|
|
|
void getStopConditions(XMLConfigurationPtr config);
|
2019-02-01 15:10:13 +00:00
|
|
|
void extractAuxiliaryQueries(XMLConfigurationPtr config);
|
2019-01-25 18:35:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|