mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Merge pull request #34275 from ClickHouse/fix-progress-bar
Fix progress bar width
This commit is contained in:
commit
f4423937bd
@ -243,7 +243,7 @@ void ProgressIndication::writeProgress()
|
||||
|
||||
if (width_of_progress_bar > 0)
|
||||
{
|
||||
size_t bar_width = UnicodeBar::getWidth(current_count, 0, max_count, width_of_progress_bar);
|
||||
double bar_width = UnicodeBar::getWidth(current_count, 0, max_count, width_of_progress_bar);
|
||||
std::string bar = UnicodeBar::render(bar_width);
|
||||
|
||||
/// Render profiling_msg at left on top of the progress bar.
|
||||
|
20
tests/queries/0_stateless/02204_fractional_progress_bar.sh
Executable file
20
tests/queries/0_stateless/02204_fractional_progress_bar.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/expect -f
|
||||
# Tags: no-fasttest
|
||||
|
||||
log_user 0
|
||||
set timeout 60
|
||||
match_max 100000
|
||||
|
||||
spawn clickhouse-local --progress --query "SELECT sum(number % 100000000 = 12345678 ? sleep(0.1) : 1) FROM numbers(1000000000)"
|
||||
|
||||
expect {
|
||||
"▏" { exit 0 }
|
||||
"▎" { exit 0 }
|
||||
"▍" { exit 0 }
|
||||
"▌" { exit 0 }
|
||||
"▋" { exit 0 }
|
||||
"▋" { exit 0 }
|
||||
"▊" { exit 0 }
|
||||
"▉" { exit 0 }
|
||||
timeout { exit 1 }
|
||||
}
|
Loading…
Reference in New Issue
Block a user