Ran make format

This commit is contained in:
Adam Retter 2022-02-16 11:44:35 +01:00
parent 652d3580d4
commit badf20081a
3 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@ public class MemoryUtil {
final long[] dbHandles = new long[dbCount];
final long[] cacheHandles = new long[cacheCount];
for (int i = 0; i < dbCount; i++) {
dbHandles[i] = dbs.get(i).nativeHandle_;
dbHandles[i] = dbs.get(i).nativeHandle_;
}
Iterator<Cache> itCache = null;
for (int i = 0; i < cacheCount; i++) {

View File

@ -45,7 +45,6 @@ public class MemoryUtilTest {
new FlushOptions().setWaitForFlush(true);
final RocksDB db =
RocksDB.open(options, dbFolder1.getRoot().getAbsolutePath())) {
final List<RocksDB> dbs = new ArrayList<>(1);
dbs.add(db);
final Set<Cache> caches = new HashSet<>(1);
@ -123,13 +122,14 @@ public class MemoryUtilTest {
caches.add(cache1);
caches.add(cache2);
for (final RocksDB db: dbs) {
for (final RocksDB db : dbs) {
db.put(key, value);
db.flush(flushOptions);
db.get(key);
}
final Map<MemoryUsageType, Long> usage = MemoryUtil.getApproximateMemoryUsageByType(dbs, caches);
final Map<MemoryUsageType, Long> usage =
MemoryUtil.getApproximateMemoryUsageByType(dbs, caches);
assertThat(usage.get(MemoryUsageType.kMemTableTotal)).isEqualTo(
db1.getAggregatedLongProperty(MEMTABLE_SIZE) + db2.getAggregatedLongProperty(MEMTABLE_SIZE));
assertThat(usage.get(MemoryUsageType.kMemTableUnFlushed)).isEqualTo(

View File

@ -79,8 +79,8 @@ public class TestUtil {
*
* @return the random int
*/
public static int intBetween(final Random random, final int minInclusive,
final int maxInclusive) {
public static int intBetween(
final Random random, final int minInclusive, final int maxInclusive) {
return random.nextInt((maxInclusive - minInclusive) + 1) + minInclusive;
}
}