You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/10/19 10:49:03 UTC

[GitHub] [lucene] rmuir commented on a diff in pull request #11856: Fix nanos to millis conversion for tests

rmuir commented on code in PR #11856:
URL: https://github.com/apache/lucene/pull/11856#discussion_r999273020


##########
lucene/core/src/java/org/apache/lucene/index/CheckIndex.java:
##########
@@ -4190,7 +4190,7 @@ private static Status.SoftDeletsStatus checkSoftDeletes(
   }
 
   private static double nsToSec(long ns) {
-    return ns / 1000000000.0;
+    return ns / (double) TimeUnit.SECONDS.toNanos(1);

Review Comment:
   Nothing calls this gazillions of times, its only called once per "message" printed from checkindex, after it does a ton of work.



-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org