Commit Graph
147 Commits
Author SHA1 Message Date
Alexey MilovidovandGitHub 842b133f8d Merge pull request #100399 from ClickHouse/clang-tidy-init-variables
Enable clang-tidy check for uninitialized variables
2026-05-31 21:56:29 -07:00
Alexey MilovidovandGitHub 8689ff4ea3 Merge branch 'master' into fix-compiler-warnings 2026-05-19 22:51:19 +02:00
Alexey Milovidov a4a69d3774 Merge remote-tracking branch 'origin/master' into clang-tidy-init-variables
# Conflicts:
#	src/Client/BuzzHouse/Generator/QueryOracle.h
#	src/Functions/hilbertEncode.cpp
#	src/Interpreters/ProfileEventsExt.h
#	src/Storages/Statistics/ConditionSelectivityEstimator.cpp
#	src/Storages/Statistics/Statistics.cpp
#	src/Storages/Statistics/tests/gtest_stats.cpp
2026-05-19 16:20:47 +00:00
Aleksandr Musorin 94fe3b4a60 Merge remote-tracking branch 'upstream/master' into clickhouse-benchmark-multiline 2026-05-18 20:15:29 +02:00
Alexey Milovidov 5e6b6b97f3 Merge remote-tracking branch 'origin/master' into fix-compiler-warnings 2026-05-18 06:31:13 +00:00
Alexey MilovidovandClaude Opus 4.7 0bb3c50f8e Replace --multiquery flag with --queries-format
Address review feedback on PR #99972: rename the previously added
`-m`, `--multiquery` flag to `--queries-format` with two possible
values:

- `tsv` (default) - one tab-escaped query per line (existing behavior)
- `script`        - parse stdin as a script of queries separated by `;`

The new name better reflects that `clickhouse-benchmark` already
supports multiple queries by default, and only the input *format*
changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-05-17 12:10:59 +00:00
Groene AI 8e925b2f6c Restore implicit value for clickhouse-benchmark --reconnect
PR #79465 changed `--reconnect` from a boolean flag to an integer option
of type `value<size_t>()->default_value(0)` to support `--reconnect=N`
(reconnect every N queries) without losing the previous boolean
semantics. However the bare `--reconnect` form (no value) regressed:
boost::program_options requires a value for `value<T>()` options unless
an `implicit_value` is also specified, so the old `--reconnect` syntax
now fails with:

    Bad arguments: the required argument for option '--reconnect' is missing

Restore the previous behaviour by adding `->implicit_value(1)` to the
option definition. The full set of forms now works:

    --reconnect          reconnect every query (same as --reconnect=1)
    --reconnect=0        never reconnect (same as omitting the flag)
    --reconnect=N        reconnect every N queries
    (no --reconnect)     never reconnect

Add a stateless regression test
`04244_benchmark_reconnect_flag_101748.sh` that asserts all three
spellings parse successfully.

Closes #101748
2026-05-15 09:04:12 +00:00
Alexey Milovidov 9567f0d9ba Merge remote-tracking branch 'origin/master' into clang-tidy-init-variables
# Conflicts:
#	src/Processors/QueryPlan/Optimizations/Optimizations.h
#	src/Storages/MaterializedView/RefreshTask.cpp
2026-05-08 03:15:33 +00:00
Alexey Milovidov 7d54e33c7c Merge remote-tracking branch 'origin/master' into fix-compiler-warnings
# Conflicts:
#	programs/main.cpp
2026-05-06 03:18:15 +00:00
Aleksandr Musorin df17eea84f Rename multiline to multiquery 2026-04-11 20:08:46 +02:00
Alexey MilovidovandClaude Opus 4.6 c552983e4f Fix typo in clickhouse-benchmark help text
Change "produces reports query statistics" to "reports query statistics".

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-03-30 11:51:32 +00:00
Alexey MilovidovandClaude Opus 4.6 8b47d200d5 Enable -Wmissing-prototypes compiler warning
Add `static` to file-local functions and forward declarations
for cross-TU functions to satisfy `-Wmissing-prototypes`.

This ensures all functions have visible prototypes before their
definitions, improving code quality and catching accidental
linkage issues.

Reference: https://github.com/ClickHouse/ClickHouse/issues/76944

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-03-27 20:11:07 +00:00
Alexey MilovidovandClaude Opus 4.6 d249cd3f9d Fix clang-tidy cppcoreguidelines-init-variables and hicpp-member-init after merge with master
New code from master introduced uninitialized variables and struct
members that trigger the newly enabled clang-tidy checks. Fix all 368
errors by adding default initializers (`{}`, `= 0`, `= nullptr`) to
local variables and struct/class member declarations.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100399&sha=78a76ff56fc5747009e8c34795b8a3cb2432eeae&name_0=PR

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-03-24 11:25:35 +00:00
Aleksandr Musorin b11cc5e63c Allow multiline queries in clickhouse-benchmarks 2026-03-18 20:10:58 +01:00
Alexey MilovidovandGitHub bf3f8ab251 Merge master into revert-98038-revert-96025-clickhouse-help 2026-03-03 00:41:57 +01:00
Azat Khuzhin 8ef1fb986f benchmark: enable --secure by default for cloud 2026-03-02 09:41:10 +01:00
Alexey MilovidovandGitHub 85164c93d4 Revert "Revert "Improve help output for ClickHouse applications"" 2026-02-27 00:49:00 +01:00
Alexey MilovidovandGitHub e8654c51eb Revert "Improve help output for ClickHouse applications" 2026-02-26 07:51:17 +01:00
Raúl MarínandClaude Opus 4.6 9aa8e4ed27 Move ErrnoException from Exception.h to its own header
Extract `ErrnoException` into `Common/ErrnoException.h` to reduce the
include footprint of `Exception.h`. This removes `<base/errnoToString.h>`
and `<cerrno>` from `Exception.h`, which is included by ~95% of all
translation units.

All files referencing `ErrnoException` now include the new header
directly. Files that used `errnoToString` without `ErrnoException`
got an explicit `<base/errnoToString.h>` include.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-20 13:47:23 +01:00
Alexey MilovidovandClaude Opus 4.5 62ccfbd3aa Improve help output for ClickHouse applications
This commit improves the help output for all ClickHouse applications:

- Add `clickhouse help` command that lists all available subcommands
- Return exit code 0 for all help messages (previously some returned 1)
- Output help messages to stdout instead of stderr
- Use "clickhouse <cmd>" format instead of argv[0] in help messages
- Add dynamic `app_name` detection for `clickhouse client` and `clickhouse local`
  to show correct invocation name based on how the binary was called
- Add `--no-sudo` option for `clickhouse start` and `clickhouse restart`
  for environments without sudo (e.g., Docker containers)
- Add detailed help headers and footers for client and local with usage examples

Closes #58244

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-02-05 07:12:44 +01:00
Antonio Andelic dc3d47d689 Enable implicit-int-float-conversion check 2026-01-20 09:35:57 +01:00
d94922841d Update --proto-caps description in ch benchmark
Co-authored-by: Sergei Trifonov <[email protected]>
2025-10-13 22:46:13 +03:00
0xgouda 86aa628bde add proto_caps to clickhouse-benchmark option. 2025-10-12 13:50:58 +03:00
0xgouda 694cf7274e Check positional arguments separately
- allow for `-- -k v` even if not recognised by the parser
2025-10-03 17:34:04 +03:00
0xgouda 82d30eafa8 catch all exceptions in catch(...) block
- no need for special handling for `DB::Exception`
2025-10-02 03:12:01 +03:00
0xgouda 1b46fa6f50 Fix mainEntryClickhouseBenchmark() exception handler
- default to false in `print_stacktrace`
- add custom handlers for `DB::Exception` and `po::error`
2025-09-30 23:50:59 +03:00
0xgouda 671da93637 Add exception handlers to main() 2025-09-30 23:43:39 +03:00
Vladimir CherkasovandGitHub c38a48e190 Merge pull request #87251 from 0xgouda/fix-clickhouse-benchmark-cli-parser
Align CLI options for `clickhouse-benchmark` with `clickhouse-client`
2025-09-30 07:56:48 +00:00
0xgouda cd7d5dd16c Rename ClientBaseOptimizedParts.{h, cpp} to ClientApplicationBaseParser.{h, cpp}
The files only include the parsing logic for `ClientApplicationBase`.
2025-09-26 10:16:45 +03:00
Azat Khuzhin 199ad135c1 Add support for --accept-invalid-certificate into clickhouse-benchmark 2025-09-22 15:53:39 +02:00
Azat Khuzhin b9f0c6c9a9 Add --connection support for clickhouse-benchmarks
Support --connection in clickhouse-benchmarks. It is the same as
supported by clickhouse-client, you can specify predefined connections
in client config.xml/config.yaml under connections_credentials path, to
avoid explicitly specifying user/password via command line arguments.
2025-09-22 12:15:41 +02:00
0xgouda 3b9795999e fix style errors 2025-09-20 15:20:26 +03:00
0xgouda 179af7ac01 use OptionsAliasParser in clickhouse-benchmark 2025-09-17 21:46:18 +03:00
serxa 085ee872a9 fix: do not print not closed intervals 2025-09-16 15:38:00 +00:00
serxa 0b3d388e54 Merge branch 'benchmark-precise-mode' of github.com:ClickHouse/ClickHouse into benchmark-precise-mode 2025-09-09 17:16:02 +00:00
serxa 6d615800cf Fix --roundrobin mode 2025-09-09 17:15:27 +00:00
e7b4080291 Update programs/benchmark/Benchmark.cpp
Co-authored-by: Bharat Nallan <[email protected]>
2025-09-08 09:07:18 +01:00
2f6e2fbecb Update programs/benchmark/Benchmark.cpp
Co-authored-by: Bharat Nallan <[email protected]>
2025-09-08 09:07:11 +01:00
5072bf24d2 Update Benchmark.cpp
Co-authored-by: Bharat Nallan <[email protected]>
2025-09-05 02:53:11 +01:00
serxa e2f68be998 do not print concurrency in the final report 2025-09-04 20:31:38 +00:00
serxa c53e63e1bf report number of finished queries 2025-09-04 14:24:09 +00:00
serxa 4638525eea fix --cumulative flag 2025-09-04 14:02:45 +00:00
serxa ea01853c2c add clickhouse-benchmark --precise flag for better per-interval statistics 2025-09-04 13:38:54 +00:00
serxa 477414a98c Increasing concurrency mode for benchmark 2025-08-14 10:42:46 +00:00
Raúl Marín 5987eadc98 Merge remote-tracking branch 'blessed/master' into reduce_port_header_memcpy_cont 2025-07-14 15:17:12 +02:00
Raúl Marín 6accf5522e Remove Block operator bool 2025-07-14 15:06:38 +02:00
ddavid 6030a3a38c Support CLICKHOUSE_HOST environment variable 2025-07-12 22:24:39 +03:00
Raúl Marín d87ee15b4b Extend the use of SharedHeader across the codebase 2025-07-10 00:08:25 +02:00
Alexey Milovidov 66bc4660c7 Merge branch 'master' into benchmark-reconnect 2025-07-01 02:00:29 +02:00
Alexey Milovidov b307445d5b Fix the wrong default value for the --reconnect option in clickhouse-benchmark 2025-06-26 18:40:31 +02:00