Skip to content

Commit

Permalink
Adding logs for getting the times
Browse files Browse the repository at this point in the history
Signed-off-by: Navneet Verma <navneev@amazon.com>
  • Loading branch information
navneet1v committed Sep 28, 2024
1 parent 62eb0b2 commit 56c260c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,16 @@ public void flush(int maxDoc, final Sorter.DocMap sortMap) throws IOException {
@Override
public void mergeOneField(final FieldInfo fieldInfo, final MergeState mergeState) throws IOException {
// This will ensure that we are merging the FlatIndex during force merge.
StopWatch stopwatch = new StopWatch().start();
flatVectorsWriter.mergeOneField(fieldInfo, mergeState);

log.info("Merge : Reading and writing merged FlatVector Took : {} ms", stopwatch.stop().totalTime().millis());
final VectorDataType vectorDataType = extractVectorDataType(fieldInfo);
final Supplier<KNNVectorValues<?>> knnVectorValuesSupplier = () -> getVectorValues(vectorDataType, fieldInfo, mergeState);
stopwatch = new StopWatch().start();
final QuantizationState quantizationState = train(fieldInfo, knnVectorValuesSupplier);
final KNNVectorValues<?> knnVectorValues = knnVectorValuesSupplier.get();
final int totalLiveDocs = Math.toIntExact(knnVectorValues.totalLiveDocs());
log.info("Merge : Reading new live docs Took with merging vector values : {} ms", stopwatch.stop().totalTime().millis());
if (totalLiveDocs <= 0) {
log.debug("[Merge] No live docs for field {}", fieldInfo.getName());
return;
Expand Down

0 comments on commit 56c260c

Please sign in to comment.