updated duration reporting to be the same format

This commit is contained in:
Jeremy Long
2016-10-16 07:32:05 -04:00
parent 9150df964f
commit 48b4ef1944

View File

@@ -25,6 +25,7 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.builder.CompareToBuilder; import org.apache.commons.lang3.builder.CompareToBuilder;
import org.apache.lucene.document.Document; import org.apache.lucene.document.Document;
import org.apache.lucene.index.CorruptIndexException; import org.apache.lucene.index.CorruptIndexException;
@@ -155,10 +156,10 @@ public class CPEAnalyzer extends AbstractAnalyzer {
cve.open(); cve.open();
cpe = CpeMemoryIndex.getInstance(); cpe = CpeMemoryIndex.getInstance();
try { try {
LOGGER.info("Creating the CPE Index");
final long creationStart = System.currentTimeMillis(); final long creationStart = System.currentTimeMillis();
cpe.open(cve); cpe.open(cve);
LOGGER.info("CPE Index Created ({} ms)", System.currentTimeMillis() - creationStart); final long creationSeconds = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() - creationStart);
LOGGER.info("Created CPE Index ({} seconds)", creationSeconds);
} catch (IndexException ex) { } catch (IndexException ex) {
LOGGER.debug("IndexException", ex); LOGGER.debug("IndexException", ex);
throw new DatabaseException(ex); throw new DatabaseException(ex);