Skip to content

Tpcc cli and import cleanup (#17333) #19771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 18, 2025

Conversation

eivanov89
Copy link
Member

Changelog entry

...

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

...

@eivanov89 eivanov89 requested review from pnv1 and Copilot June 17, 2025 16:25
@eivanov89 eivanov89 requested a review from a team as a code owner June 17, 2025 16:25
Copy link

🟢 2025-06-17 16:26:09 UTC The validation of the Pull Request description is successful.

Copilot

This comment was marked as outdated.

Copy link

github-actions bot commented Jun 17, 2025

2025-06-17 16:28:34 UTC Pre-commit check linux-x86_64-release-asan for bcf5d91 has started.
2025-06-17 16:28:55 UTC Artifacts will be uploaded here
2025-06-17 16:31:55 UTC ya make is running...
🟢 2025-06-17 17:04:35 UTC ydbd size 3.9 GiB changed* by +19.7 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 617d03a merge: bcf5d91 diff diff %
ydbd size 4 172 736 512 Bytes 4 172 756 640 Bytes +19.7 KiB +0.000%
ydbd stripped size 1 446 994 936 Bytes 1 447 005 688 Bytes +10.5 KiB +0.001%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation
2025-06-17 17:04:37 UTC Check cancelled

Copy link

github-actions bot commented Jun 17, 2025

2025-06-17 16:29:19 UTC Pre-commit check linux-x86_64-relwithdebinfo for bcf5d91 has started.
2025-06-17 16:29:32 UTC Artifacts will be uploaded here
2025-06-17 16:31:59 UTC ya make is running...
🟡 2025-06-17 16:59:28 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
2164 2149 0 3 4 8

2025-06-17 16:59:48 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-06-17 17:04:18 UTC ydbd size 2.2 GiB changed* by 0 Bytes, which is <= 0 Bytes vs main: OK

ydbd size dash main: 63c2e1f merge: bcf5d91 diff diff %
ydbd size 2 372 422 808 Bytes 2 372 422 808 Bytes 0 Bytes 0.000%
ydbd stripped size 497 436 424 Bytes 497 436 424 Bytes 0 Bytes 0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation
2025-06-17 17:04:20 UTC Check cancelled

@eivanov89 eivanov89 requested review from Copilot and pnv1 June 17, 2025 17:04
Copy link

github-actions bot commented Jun 17, 2025

2025-06-17 17:05:04 UTC Pre-commit check linux-x86_64-relwithdebinfo for d9071cd has started.
2025-06-17 17:05:08 UTC Artifacts will be uploaded here
2025-06-17 17:07:39 UTC ya make is running...
🟡 2025-06-17 17:55:36 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
2164 2141 0 3 3 17

2025-06-17 17:55:58 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-06-17 18:03:00 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
165 (only retried tests) 160 0 0 0 5

🟢 2025-06-17 18:03:08 UTC Build successful.
🟡 2025-06-17 18:03:19 UTC ydbd size 2.2 GiB changed* by +467.2 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 63c2e1f merge: d9071cd diff diff %
ydbd size 2 372 422 808 Bytes 2 372 901 256 Bytes +467.2 KiB +0.020%
ydbd stripped size 497 436 424 Bytes 497 506 952 Bytes +68.9 KiB +0.014%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Jun 17, 2025

2025-06-17 17:06:06 UTC Pre-commit check linux-x86_64-release-asan for d9071cd has started.
2025-06-17 17:06:10 UTC Artifacts will be uploaded here
2025-06-17 17:08:43 UTC ya make is running...
🟡 2025-06-17 18:09:39 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1388 1310 0 12 60 6

2025-06-17 18:09:56 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-06-17 18:31:08 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
161 (only retried tests) 135 0 8 12 6

2025-06-17 18:31:17 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-06-17 18:53:08 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
159 (only retried tests) 130 0 8 15 6

🟢 2025-06-17 18:53:15 UTC Build successful.
🟡 2025-06-17 18:53:33 UTC ydbd size 3.9 GiB changed* by +748.4 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 63c2e1f merge: d9071cd diff diff %
ydbd size 4 172 756 736 Bytes 4 173 523 072 Bytes +748.4 KiB +0.018%
ydbd stripped size 1 447 005 752 Bytes 1 447 231 672 Bytes +220.6 KiB +0.016%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the TPCC CLI and runner by introducing duration-based options, unifying display logic, and cleaning up import and thread‐count calculations.

  • Add a Config override for the TPCC import command and expose new CLI flags
  • Switch warmup/run times from integer minutes to TDuration parsing
  • Factor out display mode logic into TRunConfig::SetDisplay() and update runner/import to use it

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ydb/public/lib/ydb_cli/commands/ydb_workload_tpcc.cpp Added Config() for import, new CLI options (warehouses, threads)
ydb/library/workload/tpcc/runner.h Switched from minute-integers to TDuration, added format enum
ydb/library/workload/tpcc/runner.cpp Refactored display logic, updated thread-count heuristics, logging
ydb/library/workload/tpcc/import.cpp Replaced SetDisplayUpdateInterval with SetDisplay(), import fixes
ydb/library/workload/tpcc/constants.h Introduced WAREHOUSES_PER_CPU_CORE constant
Comments suppressed due to low confidence (3)

ydb/public/lib/ydb_cli/commands/ydb_workload_tpcc.cpp:169

  • The threads option is marked as required but has no .DefaultValue(), forcing users to always specify it. Consider adding .DefaultValue(RunConfig->ThreadCount) to maintain consistency.
        't', "time", TStringBuilder() << "Execution time. Example: 10s, 5m, 1h")

ydb/library/workload/tpcc/runner.cpp:166

  • [nitpick] You added a new DURATION parsing option for warmup. Consider adding unit tests to validate parsing of inputs like "10s", "5m", and "1h".
    void ExitTuiMode();

ydb/library/workload/tpcc/runner.cpp:486

  • Replaced direct std::cout output with LOG_I(), which may redirect text mode output into logs rather than stdout. This change could break existing CLI users who rely on console output; verify intended behavior.
    LOG_I(ss.str());

@eivanov89 eivanov89 enabled auto-merge (squash) June 17, 2025 19:16
@eivanov89 eivanov89 merged commit abeada2 into ydb-platform:main Jun 18, 2025
11 checks passed
@eivanov89 eivanov89 deleted the tpcc_cli_and_import_cleanup branch June 20, 2025 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants