MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / StorageRunner

Method StorageRunner

programs/keeper-bench/StorageRunner.cpp:45–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45StorageRunner::StorageRunner(
46 const std::string & config_path_,
47 std::optional<size_t> concurrency_,
48 std::optional<double> max_time_,
49 std::optional<double> report_delay_,
50 std::optional<size_t> max_iterations_,
51 std::optional<bool> continue_on_error_)
52 : config_path(config_path_)
53{
54 if (config_path.empty())
55 throw DB::Exception(DB::ErrorCodes::BAD_ARGUMENTS, "--config is required in --storage mode");
56
57 auto log_channel = Poco::AutoPtr<Poco::ConsoleChannel>(new Poco::ConsoleChannel(std::cerr));
58 Poco::Logger::root().setChannel(log_channel);
59 Poco::Logger::root().setLevel("error");
60
61 DB::ConfigProcessor config_processor(config_path, true, false);
62 config_ptr = config_processor.loadConfig().configuration;
63
64 parseConfig(*config_ptr);
65
66 if (concurrency_)
67 concurrency = *concurrency_;
68 if (max_time_)
69 max_time = *max_time_;
70 if (report_delay_)
71 report_delay = *report_delay_;
72 if (max_iterations_)
73 max_iterations = *max_iterations_;
74 if (continue_on_error_)
75 continue_on_error = *continue_on_error_;
76}
77
78StorageRunner::~StorageRunner()
79{

Callers

nothing calls this directly

Calls 5

ExceptionClass · 0.50
emptyMethod · 0.45
setChannelMethod · 0.45
setLevelMethod · 0.45
loadConfigMethod · 0.45

Tested by

no test coverage detected