Class SnapshotBenchmark
java.lang.Object
io.datarouter.filesystem.snapshot.benchmark.SnapshotBenchmark
public class SnapshotBenchmark extends Object
-
Field Summary
Fields Modifier and Type Field Description SnapshotGroupgrouplongnumEntriesbooleanpersistSnapshotKeysnapshotKeystatic intWRITE_BATCH_SIZEintwriteBatchSize -
Constructor Summary
Constructors Constructor Description SnapshotBenchmark(SnapshotGroup group, int numInputThreads, int numWriterThreads, long numEntries, int writeBatchSize, boolean persist) -
Method Summary
Modifier and Type Method Description voidcleanup()RootBlockexecute()static List<SnapshotEntry>makeEntries(long from, int limit)io.datarouter.scanner.Scanner<List<SnapshotEntry>>makeEntryScanner(ExecutorService exec, int numThreads)static byte[]makeKey(long id)static byte[]makeValue(long id)voidshutdown()
-
Field Details
-
WRITE_BATCH_SIZE
public static final int WRITE_BATCH_SIZE- See Also:
- Constant Field Values
-
group
-
numEntries
public final long numEntries -
writeBatchSize
public final int writeBatchSize -
persist
public final boolean persist -
snapshotKey
-
-
Constructor Details
-
SnapshotBenchmark
public SnapshotBenchmark(SnapshotGroup group, int numInputThreads, int numWriterThreads, long numEntries, int writeBatchSize, boolean persist)
-
-
Method Details
-
execute
-
cleanup
public void cleanup() -
shutdown
public void shutdown() -
makeEntryScanner
public io.datarouter.scanner.Scanner<List<SnapshotEntry>> makeEntryScanner(ExecutorService exec, int numThreads) -
makeEntries
-
makeKey
public static byte[] makeKey(long id) -
makeValue
public static byte[] makeValue(long id)
-