1
0
Fork 0

Merge pull request #7357 from Toflar/better-solver-debug-output

Improve SAT resolving developer debug information
pull/7387/merge
Jordi Boggiano 2018-06-06 14:01:57 +02:00 committed by GitHub
commit 3fb2a054a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -226,6 +226,7 @@ class Solver
$this->io->writeError('Resolving dependencies through SAT', true, IOInterface::DEBUG); $this->io->writeError('Resolving dependencies through SAT', true, IOInterface::DEBUG);
$before = microtime(true); $before = microtime(true);
$this->runSat(true); $this->runSat(true);
$this->io->writeError('', true, IOInterface::DEBUG);
$this->io->writeError(sprintf('Dependency resolution completed in %.3f seconds', microtime(true) - $before), true, IOInterface::VERBOSE); $this->io->writeError(sprintf('Dependency resolution completed in %.3f seconds', microtime(true) - $before), true, IOInterface::VERBOSE);
// decide to remove everything that's installed and undecided // decide to remove everything that's installed and undecided
@ -759,10 +760,19 @@ class Solver
} }
$rulesCount = count($this->rules); $rulesCount = count($this->rules);
$pass = 1;
$this->io->writeError('Looking at all rules.', true, IOInterface::DEBUG);
for ($i = 0, $n = 0; $n < $rulesCount; $i++, $n++) { for ($i = 0, $n = 0; $n < $rulesCount; $i++, $n++) {
if ($i == $rulesCount) { if ($i == $rulesCount) {
if (1 === $pass) {
$this->io->writeError("Something's changed, looking at all rules again (pass #$pass)", false, IOInterface::DEBUG);
} else {
$this->io->overwriteError("Something's changed, looking at all rules again (pass #$pass)", false, null, IOInterface::DEBUG);
}
$i = 0; $i = 0;
$pass++;
} }
$rule = $this->rules->ruleById[$i]; $rule = $this->rules->ruleById[$i];