mikemccand commented on code in PR #14765: URL: https://github.com/apache/lucene/pull/14765#discussion_r2137811504
########## lucene/core/src/java/org/apache/lucene/util/hnsw/OnHeapHnswGraph.java: ########## @@ -32,6 +32,15 @@ */ public final class OnHeapHnswGraph extends HnswGraph implements Accountable { + private static final long RAM_BYTES_USED = + 4L * Integer.BYTES // all int fields + + 1 // field: noGrowth + + RamUsageEstimator.NUM_BYTES_OBJECT_REF + + RamUsageEstimator.NUM_BYTES_OBJECT_HEADER + + 2 * Integer.BYTES // field: entryNode + + 3L * (Integer.BYTES + RamUsageEstimator.NUM_BYTES_OBJECT_HEADER) // 3 AtomicInteger Review Comment: Maybe ask Claude or Q or CoPiolot or ChatGPT or Gemini or so to generate this big long `RAM_BYTES_USED`? It's so error proned and time consuming for we humans ... maybe genai can do it one-time quickly / more reliably for this PR. -- 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-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org