File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/org/opensolaris/opengrok/index Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 98
98
import org .opensolaris .opengrok .util .ForbiddenSymlinkException ;
99
99
import org .opensolaris .opengrok .util .IOUtils ;
100
100
import org .opensolaris .opengrok .util .ObjectPool ;
101
+ import org .opensolaris .opengrok .util .Statistics ;
101
102
import org .opensolaris .opengrok .web .Util ;
102
103
103
104
/**
@@ -597,6 +598,7 @@ public void optimize() throws IOException {
597
598
IndexWriter wrt = null ;
598
599
IOException writerException = null ;
599
600
try {
601
+ Statistics elapsed = new Statistics ();
600
602
String projectDetail = this .project != null ? " for project " + project .getName () : "" ;
601
603
LOGGER .log (Level .INFO , "Optimizing the index{0}" , projectDetail );
602
604
Analyzer analyzer = new StandardAnalyzer ();
@@ -605,7 +607,7 @@ public void optimize() throws IOException {
605
607
606
608
wrt = new IndexWriter (indexDirectory , conf );
607
609
wrt .forceMerge (1 ); // this is deprecated and not needed anymore
608
- LOGGER . log ( Level . INFO , "Done optimizing index{0} " , projectDetail );
610
+ elapsed . report ( LOGGER , String . format ( "Done optimizing index%s " , projectDetail ) );
609
611
synchronized (lock ) {
610
612
if (dirtyFile .exists () && !dirtyFile .delete ()) {
611
613
LOGGER .log (Level .FINE , "Failed to remove \" dirty-file\" : {0}" ,
You can’t perform that action at this time.
0 commit comments