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

Method printChangedSettings

programs/client/Client.cpp:703–727  ·  view source on GitHub ↗

Prints changed settings to stderr. Useful for debugging fuzzing failures.

Source from the content-addressed store, hash-verified

701
702// Prints changed settings to stderr. Useful for debugging fuzzing failures.
703void Client::printChangedSettings() const
704{
705 auto print_changes = [](const auto & changes, std::string_view settings_name)
706 {
707 if (!changes.empty())
708 {
709 fmt::print(stderr, "Changed {}: ", settings_name);
710 for (size_t i = 0; i < changes.size(); ++i)
711 {
712 if (i)
713 fmt::print(stderr, ", ");
714 fmt::print(stderr, "{} = '{}'", changes[i].name, fieldToString(changes[i].value));
715 }
716
717 fmt::print(stderr, "\n");
718 }
719 else
720 {
721 fmt::print(stderr, "No changed {}.\n", settings_name);
722 }
723 };
724
725 print_changes(client_context->getSettingsRef().changes(), "settings");
726 print_changes(cmd_merge_tree_settings->changes(), "MergeTree settings");
727}
728
729
730String Client::getHelpHeader() const

Callers

nothing calls this directly

Calls 5

fieldToStringFunction · 0.85
printFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45
changesMethod · 0.45

Tested by

no test coverage detected