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

Method run

programs/server/Server.cpp:709–728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

707}
708
709int Server::run()
710{
711 if (config().hasOption("help"))
712 {
713 Poco::Util::HelpFormatter help_formatter(Server::options());
714 std::string app_name = (commandName() == "clickhouse-server") ? "clickhouse-server" : "clickhouse server";
715 auto header_str = fmt::format("{} [OPTION] [-- [ARG]...]\n"
716 "positional arguments can be used to rewrite config.xml properties, for example, --http_port=8010",
717 app_name);
718 help_formatter.setHeader(header_str);
719 help_formatter.format(std::cout);
720 return 0;
721 }
722 if (config().hasOption("version"))
723 {
724 std::cout << VERSION_NAME << " server version " << VERSION_STRING << VERSION_OFFICIAL << "." << std::endl;
725 return 0;
726 }
727 return Application::run(); // NOLINT
728}
729
730void Server::initialize(Poco::Util::Application & self)
731{

Calls 5

formatFunction · 0.50
runFunction · 0.50
hasOptionMethod · 0.45
setHeaderMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected