|
|
| ProfilingInfo (const profiler_settings_t &n_settings, const idx_t depth=0) |
| |
|
| ProfilingInfo (ProfilingInfo &)=default |
| |
|
ProfilingInfo & | operator= (ProfilingInfo const &)=default |
| |
|
void | ResetMetrics () |
| |
|
string | GetMetricAsString (const MetricType metric) const |
| |
|
void | WriteMetricsToLog (ClientContext &context) |
| |
|
void | WriteMetricsToJSON (duckdb_yyjson::yyjson_mut_doc *doc, duckdb_yyjson::yyjson_mut_val *destination) |
| |
| template<class METRIC_TYPE > |
| METRIC_TYPE | GetMetricValue (const MetricType type) const |
| |
| template<class METRIC_TYPE > |
| void | MetricUpdate (const MetricType type, const Value &value, const std::function< METRIC_TYPE(const METRIC_TYPE &, const METRIC_TYPE &)> &update_fun) |
| |
| template<class METRIC_TYPE > |
| void | MetricUpdate (const MetricType type, const METRIC_TYPE &value, const std::function< METRIC_TYPE(const METRIC_TYPE &, const METRIC_TYPE &)> &update_fun) |
| |
| template<class METRIC_TYPE > |
| void | MetricSum (const MetricType type, const Value &value) |
| |
| template<class METRIC_TYPE > |
| void | MetricSum (const MetricType type, const METRIC_TYPE &value) |
| |
| template<class METRIC_TYPE > |
| void | MetricMax (const MetricType type, const Value &value) |
| |
| template<class METRIC_TYPE > |
| void | MetricMax (const MetricType type, const METRIC_TYPE &value) |
| |
| template<> |
| InsertionOrderPreservingMap< string > | GetMetricValue (const MetricType type) const |
| |
|
|
static bool | Enabled (const profiler_settings_t &settings, const MetricType metric) |
| | Returns true, if the query profiler must collect this metric.
|
| |
|
static void | Expand (profiler_settings_t &settings, const MetricType metric) |
| | Expand metrics depending on the collection of other metrics.
|
| |
|
|
profiler_settings_t | settings |
| | Enabling a metric adds it to this set.
|
| |
|
profiler_settings_t | expanded_settings |
| | This set contains the expanded to-be-collected metrics, which can differ from 'settings'.
|
| |
|
profiler_metrics_t | metrics |
| | Contains all enabled metrics.
|
| |
◆ GetMetricValue() [1/2]
| METRIC_TYPE duckdb::ProfilingInfo::GetMetricValue |
( |
const MetricType |
type | ) |
const |
|
inline |
36326 {
36328 return val.GetValue<METRIC_TYPE>();
36329 }
profiler_metrics_t metrics
Contains all enabled metrics.
Definition duckdb.hpp:36304
◆ MetricUpdate() [1/2]
36333 {
36336 return;
36337 }
36338 auto new_value = update_fun(
metrics[type].GetValue<METRIC_TYPE>(), value.GetValue<METRIC_TYPE>());
36339 metrics[type] = Value::CreateValue(new_value);
36340 }
◆ MetricUpdate() [2/2]
36344 {
36345 auto new_value = Value::CreateValue(value);
36346 MetricUpdate<METRIC_TYPE>(type, new_value, update_fun);
36347 }
◆ MetricSum() [1/2]
36350 {
36351 MetricUpdate<METRIC_TYPE>(type, value, [](const METRIC_TYPE &old_value, const METRIC_TYPE &new_value) {
36352 return old_value + new_value;
36353 });
36354 }
◆ MetricSum() [2/2]
36357 {
36358 auto new_value = Value::CreateValue(value);
36359 return MetricSum<METRIC_TYPE>(type, new_value);
36360 }
◆ MetricMax() [1/2]
36363 {
36364 MetricUpdate<METRIC_TYPE>(type, value, [](const METRIC_TYPE &old_value, const METRIC_TYPE &new_value) {
36365 return MaxValue(old_value, new_value);
36366 });
36367 }
◆ MetricMax() [2/2]
36370 {
36371 auto new_value = Value::CreateValue(value);
36372 return MetricMax<METRIC_TYPE>(type, new_value);
36373 }
◆ GetMetricValue() [2/2]
36379 {
36381 InsertionOrderPreservingMap<string> result;
36382 auto children = MapValue::GetChildren(val);
36383 for (auto &child : children) {
36384 auto struct_children = StructValue::GetChildren(child);
36385 auto key = struct_children[0].GetValue<string>();
36386 auto value = struct_children[1].GetValue<string>();
36387 result.insert(key, value);
36388 }
36389 return result;
36390}
The documentation for this class was generated from the following file: