say how many msec flush took, in infoStream

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1060324 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2011-01-18 11:31:35 +00:00
parent fcd36f5770
commit e43fdc9654
1 changed files with 6 additions and 0 deletions

View File

@ -546,6 +546,8 @@ final class DocumentsWriter {
// Lock order: IW -> DW
synchronized SegmentInfo flush(IndexWriter writer, IndexFileDeleter deleter, MergePolicy mergePolicy, SegmentInfos segmentInfos) throws IOException {
final long startTime = System.currentTimeMillis();
// We change writer's segmentInfos:
assert Thread.holdsLock(writer);
@ -646,6 +648,10 @@ final class DocumentsWriter {
// Lock order: IW -> DW -> BD
pushDeletes(newSegment, segmentInfos);
if (infoStream != null) {
message("flush time " + (System.currentTimeMillis()-startTime) + " msec");
}
return newSegment;
}