# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
^ Only build this file if this computer is not Linux OR it's not AMD64 OR rocksdb is not allowed (c) 2019-2020, Ava Labs, Inc.
No description provided by the author
No description provided by the author
# Functions
BenchmarkBatchDelete measures the time it takes to batch delete.nolint:interfacer // This function takes in a database to be the expected type.
BenchmarkBatchPut measures the time it takes to batch put.nolint:interfacer // This function takes in a database to be the expected type.
BenchmarkBatchWrite measures the time it takes to batch write.nolint:interfacer // This function takes in a database to be the expected type.
BenchmarkDelete measures the time it takes to delete a (k, v) from a database.nolint:interfacer // This function takes in a database to be the expected type.
BenchmarkGet measures the time it takes to get an operation from a database.
BenchmarkParallelDelete measures the time it takes to delete a (k, v) from the db.nolint:interfacer // This function takes in a database to be the expected type.
BenchmarkParallelGet measures the time it takes to read in parallel.
BenchmarkParallelPut measures the time it takes to write to the db in parallel.
BenchmarkPut measures the time it takes to write an operation to a database.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Writes size data into the db in order to setup reads in subsequent tests.
No description provided by the author
TestBatchDelete tests to make sure that batched deletes work as expected.
TestBatchInner tests to make sure that inner can be used to write to the database.
TestBatchLargeSize tests to make sure that the batch can support a large amount of entries.nolint:interfacer // This function must match the test function definition.
TestBatchPut tests to make sure that batched writes work as expected.
TestBatchReplay tests to make sure that batches will correctly replay their contents.
TestBatchReset tests to make sure that a batch drops un-written operations when it is reset.
TestBatchReuse tests to make sure that a batch can be reused once it is reset.
TestBatchRewrite tests to make sure that write can be called multiple times on a batch and the values will be updated correctly.
TestCompactNoPanic tests to make sure compact never panics.
TestIterator tests to make sure the database iterates over the database contents lexicographically.
TestIteratorClosed tests to make sure that an iterator that was created with a closed database will report a closed error correctly.
TestIteratorError tests to make sure that an iterator still works after the database is closed.
TestIteratorErrorAfterRelease tests to make sure that an iterator that was released still reports the error correctly.
TestIteratorMemorySafety tests to make sure that keys can values are able to be modified from the returned iterator.
TestIteratorPrefix tests to make sure the iterator can be configured to skip keys missing the provided prefix.
TestIteratorSnapshot tests to make sure the database iterates over a snapshot of the database at the time of the iterator creation.
TestIteratorStart tests to make sure the the iterator can be configured to start mid way through the database.
TestIteratorStartPrefix tests to make sure that the iterator can start mid way through the database while skipping a prefix.
No description provided by the author
TestMemorySafetyDatabase ensures it is safe to modify a key after passing it to Batch.Put.
TestMemorySafetyDatabase ensures it is safe to modify a key after passing it to Database.Put and Database.Get.
TestSimpleKeyValue tests to make sure that simple Put + Get + Delete + Has calls return the expected values.
TestSimpleKeyValueClosed tests to make sure that Put + Get + Delete + Has calls return the correct error when the database has been closed.
TestStatNoPanic tests to make sure that Stat never panics.
# Constants
No description provided by the author
If, when a batch is reset, the cap(batch)/len(batch) > MaxExcessCapacityFactor, the underlying array's capacity will be reduced by a factor of capacityReductionFactor.
# Variables
Benchmarks is a list of all database benchmarks.
BenchmarkSizes to use with each benchmark.
common errors.
common errors.
common errors.
Tests is a list of all database tests.
# Interfaces
Batch is a write-only database that commits changes to its host database when Write is called.
Batcher wraps the NewBatch method of a backing data store.
Compacter wraps the Compact method of a backing data store.
Database contains all the methods required to allow handling different key-value data stores backing the database.
Iteratee wraps the NewIterator methods of a backing data store.
Iterator iterates over a database's key/value pairs.
KeyValueReader wraps the Has and Get method of a backing data store.
No description provided by the author
KeyValueWriter wraps the Put method of a backing data store.
Stater wraps the Stat method of a backing data store.