Skip to content

Commit f034d79

Browse files
committed
Fix timing scale
1 parent 1bc1b68 commit f034d79

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

qa/vector/src/main/java/org/elasticsearch/test/knn/KnnIndexer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ public void run() {
290290
} catch (IOException ioe) {
291291
throw new UncheckedIOException(ioe);
292292
}
293-
logger.debug("Index thread times: [{}s] read, [{}s] add doc", readTime / 1e-9, docAddTime / 1e-9);
293+
logger.debug("Index thread times: [{}ms] read, [{}ms] add doc", readTime / 1_000_000, docAddTime / 1_000_000);
294294
}
295295

296296
private void _run() throws IOException {

x-pack/plugin/gpu/src/main/java/org/elasticsearch/xpack/gpu/codec/CuVSResourceManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public ManagedCuVSResources acquire(int numVectors, int dims, CuVSMatrix.DataTyp
183183
}
184184
}
185185
var elapsed = started - System.nanoTime();
186-
logger.debug("Resource acquired in [{}ms]", elapsed / 1e-6);
186+
logger.debug("Resource acquired in [{}ms]", elapsed / 1_000_000.0);
187187
res.locked = true;
188188
return res;
189189
} finally {

x-pack/plugin/gpu/src/main/java/org/elasticsearch/xpack/gpu/codec/ES92GpuHnswVectorsWriter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public void flush(int maxDoc, Sorter.DocMap sortMap) throws IOException {
170170
throw new IOException("Failed to flush GPU index: ", t);
171171
}
172172
var elapsed = started - System.nanoTime();
173-
logger.debug("Flush total time [{}ms]", elapsed / 1e-6);
173+
logger.debug("Flush total time [{}ms]", elapsed / 1_000_000.0);
174174
}
175175

176176
private void flushFieldsWithoutMemoryMappedFile(Sorter.DocMap sortMap) throws IOException, InterruptedException {
@@ -210,7 +210,7 @@ private void flushFieldsWithoutMemoryMappedFile(Sorter.DocMap sortMap) throws IO
210210
}
211211
}
212212
var elapsed = started - System.nanoTime();
213-
logger.debug("Flushed [{}] vectors in [{}ms]", numVectors, elapsed / 1e-6);
213+
logger.debug("Flushed [{}] vectors in [{}ms]", numVectors, elapsed / 1_000_000.0);
214214
}
215215
}
216216

@@ -534,7 +534,7 @@ public void mergeOneField(FieldInfo fieldInfo, MergeState mergeState) throws IOE
534534
deleteFilesIgnoringExceptions(mergeState.segmentInfo.dir, tempRawVectorsFileName);
535535
}
536536
var elapsed = started - System.nanoTime();
537-
logger.debug("Merged [{}] vectors in [{}ms]", numVectors, elapsed / 1e-6);
537+
logger.debug("Merged [{}] vectors in [{}ms]", numVectors, elapsed / 1_000_000.0);
538538
}
539539

540540
private ByteVectorValues getMergedByteVectorValues(FieldInfo fieldInfo, MergeState mergeState) throws IOException {

0 commit comments

Comments
 (0)