mikemccand commented on code in PR #15978:
URL: https://github.com/apache/lucene/pull/15978#discussion_r3147129323


##########
lucene/core/src/java/org/apache/lucene/util/hnsw/HnswGraphBuilder.java:
##########
@@ -339,17 +376,10 @@ public void addGraphNode(int node, IntHashSet eps0) 
throws IOException {
     addGraphNodeInternal(node, scorer, eps0);
   }
 
-  private long printGraphBuildStatus(int node, long start, long t) {
-    long now = System.nanoTime();
+  private void printGraphBuildStatus(int node, long start) {
+    double elapsedMs = (System.nanoTime() - start) / 1_000_000.0;

Review Comment:
   Can we rename `start` -> `startNs`?  I think it's crucial to include units 
in variable names ... I've seen too many bugs over the years where person 1 
thought it was `ns` and person 2 thought it was `us` and ...
   
   And of course the [Mars Climate Orbiter 
disaster](https://en.wikipedia.org/wiki/Mars_Climate_Orbiter).



##########
lucene/CHANGES.txt:
##########
@@ -146,6 +146,10 @@ Optimizations
 
 Bug Fixes
 ---------------------
+* GITHUB#15967: Fix HNSW InfoStream progress to show elapsed time since merge 
start instead of

Review Comment:
   Maybe state that this is an `IndexWriter` thing?  `Fix IndexWriter's HSNW 
InfoStream...`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to