Skip to content

Commit

Permalink
Added timer for indexing per doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Prabhat Sharma committed Mar 4, 2024
1 parent dd14f09 commit ff65c7f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -918,9 +918,13 @@ public IndexResult index(Index index, StopWatch translogWatch, StopWatch indexWa
assert index.seqNo() >= 0 : "ops should have an assigned seq no.; origin: " + index.origin();

if (plan.indexIntoLucene || plan.addStaleOpToLucene) {
StopWatch perDocIndexWatch = new StopWatch("per_doc_index");
perDocIndexWatch.start();
indexWatch.start();
indexResult = indexIntoLucene(index, plan);
indexWatch.stop();
perDocIndexWatch.stop();
logger.info("Time to execute {}", perDocIndexWatch.shortSummary());
} else {
indexResult = new IndexResult(
plan.versionForIndexing,
Expand Down

0 comments on commit ff65c7f

Please sign in to comment.