mirror of https://github.com/apache/lucene.git
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:
parent
fcd36f5770
commit
e43fdc9654
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue