-
Notifications
You must be signed in to change notification settings - Fork 49
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
Write dump information and dump progress bar to stderr when verbose m… #113
Conversation
Fixes #111 |
@staabm is the current implementation ok for your use case? |
afc6752
to
dcaa8c8
Compare
thanks for working on my feature request. I will have some time in the following days to look into the change and test it . I will report back |
5b83ac0
to
0be168a
Compare
After testing it with a big database, I found out that the So when a table name is displayed in the progress bar, it's not actually dumping this table, it's dumping the next table... |
thanks again for working on it. I tried it on a bigger schema, and have the following feedback: it might also make sense to look into redraw-parameters, as the symfony console per default redraws every 100ms, which is waaay too fast for our progress. I think once every second or similar would be plenty. https://symfony.com/doc/current/components/console/helpers/progressbar.html#bar-settings
|
I don't think it's possible with the current implementation of the cli 😞
Does it redraw anything when mysqldump-php is dumping a table though? |
0be168a
to
31b8b22
Compare
I see. maybe its good enough for now 👍
I didn't check how often it re-renders. I judged from the symfony progress bar docs. but as you say.. when the process is blocked we will for sure not doing it too often :) |
I left an idea in https://github.com/druidfi/mysqldump-php/pull/38/files#r1505546205 regarding printing progress while a table is dumped |
31b8b22
to
f141cbc
Compare
f141cbc
to
612c993
Compare
just tested this again locally. it feels like it updates every second now, which is awesome. thank you |
Yes, the min progress timer is set to 0.1s, but if the progress bar is stuck on a specific step, it upgrades every 1 second. |
*/ | ||
private function formatRowCount(int $rowCount): string | ||
{ | ||
return $rowCount > 1 ? sprintf('%d rows', $rowCount) : sprintf('%d row', $rowCount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think about a thousands separator?
in my case the numbers get rather long and harder to read:
Dump progress
57/405 [===>------------------------] 14% - my_table (101748356 rows) - 26 mins, 1 sec - 35.5 MiB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With a space character as the separator of course 😃
When
-v
option is provided, display information about the dump, as well as a progress bar.