store the costs first
This commit is contained in:
parent
f5d6b490f3
commit
fa4c983710
|
|
@ -92,7 +92,8 @@ public class SearchTest {
|
|||
try {
|
||||
double sTime = System.nanoTime();
|
||||
String region = searcher.searchByStr(line);
|
||||
System.out.printf("{region: %s, ioCount: %d, took: %d μs}\n", region, searcher.getIOCount(), TimeUnit.NANOSECONDS.toMicros((long) (System.nanoTime() - sTime)));
|
||||
long cost = TimeUnit.NANOSECONDS.toMicros((long) (System.nanoTime() - sTime));
|
||||
System.out.printf("{region: %s, ioCount: %d, took: %d μs}\n", region, searcher.getIOCount(), cost);
|
||||
} catch (Exception e) {
|
||||
System.out.printf("{err: %s, ioCount: %d}\n", e, searcher.getIOCount());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue