Reindex: add a progress monitor

Change ChangeIndexerImpl to use Callable and let Exceptions propagate
so we can separate success from failure. Fix the units in the final
output message and print a rate as well.

Change-Id: I341a14a44e0d5e7233b4220077ee82345b229b20
This commit is contained in:
Dave Borowitz
2013-06-20 10:47:21 -07:00
parent 31a26fc34d
commit 77ff67e437
3 changed files with 60 additions and 23 deletions

View File

@@ -16,6 +16,8 @@ package com.google.gerrit.server.git;
import static java.util.concurrent.TimeUnit.NANOSECONDS;
import com.google.common.base.Strings;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.ProgressMonitor;
import org.slf4j.Logger;
@@ -319,7 +321,10 @@ public class MultiProgressMonitor {
first = false;
}
s.append(' ').append(t.name).append(": ");
s.append(' ');
if (!Strings.isNullOrEmpty(t.name)) {
s.append(t.name).append(": ");
}
if (t.total == UNKNOWN) {
s.append(count);
} else {