From a561899da005fa60b06d62301894063b93398e82 Mon Sep 17 00:00:00 2001 From: Pablo Marcos Date: Fri, 19 Jul 2024 13:58:50 +0000 Subject: [PATCH] Rename system.query_log_metric to system.query_metric_log Seems I had at the very beginning a brainfart and started using query_log_metric instead of query_metric_log and it went on and on :facepalm --- .../settings.md | 14 +++++----- docs/en/operations/settings/settings.md | 6 ++--- ...uery_log_metric.md => query_metric_log.md} | 12 ++++----- programs/server/config.xml | 8 +++--- programs/server/config.yaml.example | 6 ++--- src/Common/SystemLogBase.cpp | 2 +- src/Core/Settings.h | 2 +- src/Core/SettingsChangesHistory.cpp | 2 +- src/Interpreters/Context.cpp | 4 +-- src/Interpreters/Context.h | 4 +-- src/Interpreters/PeriodicLog.cpp | 2 +- src/Interpreters/PeriodicLog.h | 2 +- ...{QueryLogMetric.cpp => QueryMetricLog.cpp} | 26 +++++++++---------- .../{QueryLogMetric.h => QueryMetricLog.h} | 22 ++++++++-------- src/Interpreters/SystemLog.cpp | 12 ++++----- src/Interpreters/SystemLog.h | 4 +-- src/Interpreters/executeQuery.cpp | 22 ++++++++-------- src/QueryPipeline/QueryPipeline.cpp | 4 +-- .../configs/no_system_log.xml | 2 +- .../test_backup_restore_new/test.py | 2 +- .../configs/config.d/query_metric_log.xml} | 6 ++--- .../integration/test_config_xml_full/test.py | 2 +- ..._log_metric.yaml => query_metric_log.yaml} | 4 +-- .../integration/test_config_xml_main/test.py | 2 +- .../configs/config.d/query_metric_log.xml} | 6 ++--- .../test_config_xml_yaml_mix/test.py | 2 +- ..._log_metric.yaml => query_metric_log.yaml} | 4 +-- .../integration/test_config_yaml_full/test.py | 2 +- .../configs/config.d/query_metric_log.xml} | 6 ++--- .../integration/test_config_yaml_main/test.py | 2 +- .../configs/conf.xml | 2 +- .../configs/async_metrics_no.xml | 2 +- .../test_system_flush_logs/test.py | 2 +- .../test_system_logs_recreate/test.py | 2 +- ...> 03203_system_query_metric_log.reference} | 0 ...ic.sh => 03203_system_query_metric_log.sh} | 8 +++--- 36 files changed, 105 insertions(+), 105 deletions(-) rename docs/en/operations/system-tables/{query_log_metric.md => query_metric_log.md} (83%) rename src/Interpreters/{QueryLogMetric.cpp => QueryMetricLog.cpp} (90%) rename src/Interpreters/{QueryLogMetric.h => QueryMetricLog.h} (72%) rename tests/integration/{test_config_xml_yaml_mix/configs/config.d/query_log_metric.xml => test_config_xml_full/configs/config.d/query_metric_log.xml} (70%) rename tests/integration/test_config_xml_main/configs/config.d/{query_log_metric.yaml => query_metric_log.yaml} (68%) rename tests/integration/{test_config_yaml_main/configs/config.d/query_log_metric.xml => test_config_xml_yaml_mix/configs/config.d/query_metric_log.xml} (70%) rename tests/integration/test_config_yaml_full/configs/config.d/{query_log_metric.yaml => query_metric_log.yaml} (68%) rename tests/integration/{test_config_xml_full/configs/config.d/query_log_metric.xml => test_config_yaml_main/configs/config.d/query_metric_log.xml} (70%) rename tests/queries/0_stateless/{03203_system_query_log_metric.reference => 03203_system_query_metric_log.reference} (100%) rename tests/queries/0_stateless/{03203_system_query_log_metric.sh => 03203_system_query_metric_log.sh} (85%) diff --git a/docs/en/operations/server-configuration-parameters/settings.md b/docs/en/operations/server-configuration-parameters/settings.md index ddd3d3afa0d..7eca519d907 100644 --- a/docs/en/operations/server-configuration-parameters/settings.md +++ b/docs/en/operations/server-configuration-parameters/settings.md @@ -2198,36 +2198,36 @@ If the table does not exist, ClickHouse will create it. If the structure of the ``` -# query_log_metric {#query_log_metric} +# query_metric_log {#query_metric_log} It is disabled by default. **Enabling** -To manually turn on metrics history collection [`system.query_log_metric`](../../operations/system-tables/query_log_metric.md), create `/etc/clickhouse-server/config.d/query_log_metric.xml` with the following content: +To manually turn on metrics history collection [`system.query_metric_log`](../../operations/system-tables/query_metric_log.md), create `/etc/clickhouse-server/config.d/query_metric_log.xml` with the following content: ``` xml - + system - query_log_metric
+ query_metric_log
7500 1000 1048576 8192 524288 false -
+
``` **Disabling** -To disable `query_log_metric` setting, you should create the following file `/etc/clickhouse-server/config.d/disable_query_log_metric.xml` with the following content: +To disable `query_metric_log` setting, you should create the following file `/etc/clickhouse-server/config.d/disable_query_metric_log.xml` with the following content: ``` xml - + ``` diff --git a/docs/en/operations/settings/settings.md b/docs/en/operations/settings/settings.md index 2b18ecf57f1..cceb7e528d0 100644 --- a/docs/en/operations/settings/settings.md +++ b/docs/en/operations/settings/settings.md @@ -1820,10 +1820,10 @@ Possible values: Default value: 0 (no restriction). -## query_log_metric_interval (#query_log_metric_interval) +## query_metric_log_interval (#query_metric_log_interval) -The interval in milliseconds at which the [query_log_metric](../../operations/system-tables/query_log_metric.md) for individual queries is collected. -If set to 0, it will take the `collect_interval_milliseconds` from the [query_log_metric setting](../../operations/server-configuration-parameters/settings.md#query_log_metric). +The interval in milliseconds at which the [query_metric_log](../../operations/system-tables/query_metric_log.md) for individual queries is collected. +If set to 0, it will take the `collect_interval_milliseconds` from the [query_metric_log setting](../../operations/server-configuration-parameters/settings.md#query_metric_log). Default value: 0 diff --git a/docs/en/operations/system-tables/query_log_metric.md b/docs/en/operations/system-tables/query_metric_log.md similarity index 83% rename from docs/en/operations/system-tables/query_log_metric.md rename to docs/en/operations/system-tables/query_metric_log.md index 167e50a7780..01f063e597f 100644 --- a/docs/en/operations/system-tables/query_log_metric.md +++ b/docs/en/operations/system-tables/query_metric_log.md @@ -1,11 +1,11 @@ --- -slug: /en/operations/system-tables/query_log_metric +slug: /en/operations/system-tables/query_metric_log --- -# query_log_metric +# query_metric_log Contains history of memory and metric values from table `system.events` for individual queries, periodically flushed to disk. -Once a query starts, data is collected at periodic intervals of `query_log_metric_interval` milliseconds (which is set to 1000 +Once a query starts, data is collected at periodic intervals of `query_metric_log_interval` milliseconds (which is set to 1000 by default) and when the query finishes. Columns: @@ -18,7 +18,7 @@ Columns: **Example** ``` sql -SELECT * FROM system.query_log_metric LIMIT 1 FORMAT Vertical; +SELECT * FROM system.query_metric_log LIMIT 1 FORMAT Vertical; ``` ``` text @@ -40,8 +40,8 @@ ProfileEvent_FailedSelectQuery: 0 **See also** -- [query_log_metric setting](../../operations/server-configuration-parameters/settings.md#query_log_metric) — Enabling and disabling the setting. -- [query_log_metric_interval](../../operations/settings/settings.md#query_log_metric_interval) +- [query_metric_log setting](../../operations/server-configuration-parameters/settings.md#query_metric_log) — Enabling and disabling the setting. +- [query_metric_log_interval](../../operations/settings/settings.md#query_metric_log_interval) - [system.asynchronous_metrics](../../operations/system-tables/asynchronous_metrics.md) — Contains periodically calculated metrics. - [system.events](../../operations/system-tables/events.md#system_tables-events) — Contains a number of events that occurred. - [system.metrics](../../operations/system-tables/metrics.md) — Contains instantly calculated metrics. diff --git a/programs/server/config.xml b/programs/server/config.xml index 0f3b97488cd..bf53f09c274 100644 --- a/programs/server/config.xml +++ b/programs/server/config.xml @@ -1182,18 +1182,18 @@ false - - + system - query_log_metric
+ query_metric_log
7500 1048576 8192 524288 1000 false -
+