Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::ProfileOutputSetting Struct Reference

Public Types

using RETURN_TYPE = string

Static Public Member Functions

static void SetLocal (ClientContext &context, const Value &parameter)
static void ResetLocal (ClientContext &context)
static Value GetSetting (const ClientContext &context)

Static Public Attributes

static constexpr const char * Name = "profile_output"
static constexpr const char * Description
static constexpr const char * InputType = "VARCHAR"

Member Function Documentation

◆ SetLocal()

void duckdb::ProfileOutputSetting::SetLocal ( ClientContext & context,
const Value & parameter )
static
302700 {
302701 auto &config = ClientConfig::GetConfig(context);
302702 auto parameter = input.ToString();
302703
302704 if (!parameter.empty() && config.profiler_print_format != ProfilerPrintFormat::NO_OUTPUT) {
302705 auto &file_system = FileSystem::GetFileSystem(context);
302706 const auto file_type = file_system.ExtractExtension(parameter);
302707 if (file_type != "txt") {
302708 try {
302709 EnumUtil::FromString<ProfilerPrintFormat>(file_type);
302710 } catch (std::exception &e) {
302711 throw ParserException("Invalid output file type: %s", file_type);
302712 }
302713 }
302714
302715 const auto printer_format = StringUtil::Lower(EnumUtil::ToString(config.profiler_print_format));
302716 if (file_type != printer_format && file_type != "txt") {
302717 throw ParserException("Profiler file type (%s) must either have the same file extension as the profiling "
302718 "output type (%s), or be a '.txt' file. Set \"enable_profiling = \'%s\'\" first.",
302719 parameter, printer_format, file_type);
302720 }
302721 }
302722
302723 config.profiler_save_location = parameter;
302724}
static DUCKDB_API string Lower(const string &str)
Convert a string to lowercase.
Definition duckdb.cpp:109630
DUCKDB_API string ToString() const
Convert this value to a string.
Definition duckdb.cpp:133318

◆ ResetLocal()

void duckdb::ProfileOutputSetting::ResetLocal ( ClientContext & context)
static
302726 {
302727 ClientConfig::GetConfig(context).profiler_save_location = ClientConfig().profiler_save_location;
302728}

◆ GetSetting()

Value duckdb::ProfileOutputSetting::GetSetting ( const ClientContext & context)
static
302730 {
302731 auto &config = ClientConfig::GetConfig(context);
302732 return Value(config.profiler_save_location);
302733}

Member Data Documentation

◆ Description

const char* duckdb::ProfileOutputSetting::Description
staticconstexpr
Initial value:
=
"The file to which profile output should be saved, or empty to print to the terminal"

The documentation for this struct was generated from the following file: