Skip to content

Conversation

@JINGJINGTANG
Copy link
Collaborator

No description provided.

$this->_consoleOutput->overwrite($bar, 0);
$percent = ($complete * 100);
$bar .= str_pad($percent . '%', $numberLen, ' ', STR_PAD_LEFT);
if ($percent % 10 === 0 && $percent !== $logged_percentage) {

Choose a reason for hiding this comment

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

What is this check for @JINGJINGTANG ?
$percent !== $logged_percentage

Copy link
Collaborator Author

@JINGJINGTANG JINGJINGTANG Oct 21, 2022

Choose a reason for hiding this comment

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

This is to make sure we are only logging the same progress (percentage) once to the log file. Since we are logging the progress to a log file, we can't have it overwritten the previous log. Thus, we are logging 0%, 10%, 20%...etc

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the mcap parse, we would have this inside the for loop: $logged_percentage = $progress->draw($logged_percentage);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants