Documentation ¶
Index ¶
- Variables
- func BenchmarkBatchedStore(b *testing.B, bs storage.BatchedStore)
- func BenchmarkChunkStoreDeleteRandom(b *testing.B, s storage.ChunkStore)
- func BenchmarkChunkStoreDeleteSequential(b *testing.B, s storage.ChunkStore)
- func BenchmarkChunkStoreIterateReverse(b *testing.B, s storage.ChunkStore)
- func BenchmarkChunkStoreIterateSequential(b *testing.B, s storage.ChunkStore)
- func BenchmarkChunkStoreReadHot(b *testing.B, s storage.ChunkStore)
- func BenchmarkChunkStoreReadRandom(b *testing.B, s storage.ChunkStore)
- func BenchmarkChunkStoreReadRandomMissing(b *testing.B, s storage.ChunkStore)
- func BenchmarkChunkStoreReadReverse(b *testing.B, db storage.ChunkStore)
- func BenchmarkChunkStoreReadSequential(b *testing.B, s storage.ChunkStore)
- func BenchmarkChunkStoreWriteRandom(b *testing.B, s storage.Putter)
- func BenchmarkChunkStoreWriteSequential(b *testing.B, s storage.Putter)
- func BenchmarkDeleteInBatches(b *testing.B, bs storage.BatchedStore)
- func BenchmarkDeleteInFixedSizeBatches(b *testing.B, bs storage.BatchedStore)
- func BenchmarkDeleteRandom(b *testing.B, db storage.Store)
- func BenchmarkDeleteSequential(b *testing.B, db storage.Store)
- func BenchmarkIterateReverse(b *testing.B, db storage.Store)
- func BenchmarkIterateSequential(b *testing.B, db storage.Store)
- func BenchmarkReadHot(b *testing.B, db storage.Store)
- func BenchmarkReadRandom(b *testing.B, db storage.Store)
- func BenchmarkReadRandomMissing(b *testing.B, db storage.Store)
- func BenchmarkReadReverse(b *testing.B, db storage.Store)
- func BenchmarkReadSequential(b *testing.B, db storage.Store)
- func BenchmarkStore(b *testing.B, s storage.Store)
- func BenchmarkWriteInBatches(b *testing.B, bs storage.BatchedStore)
- func BenchmarkWriteInFixedSizeBatches(b *testing.B, bs storage.BatchedStore)
- func BenchmarkWriteRandom(b *testing.B, db storage.Store)
- func BenchmarkWriteSequential(b *testing.B, db storage.Store)
- func RunChunkStoreBenchmarkTests(b *testing.B, s storage.ChunkStore)
- func TestBatchedStore(t *testing.T, bs storage.BatchedStore)
- func TestChunkStore(t *testing.T, st storage.ChunkStore)
- func TestItemClone(t *testing.T, test *ItemCloneTest)
- func TestItemMarshalAndUnmarshal(t *testing.T, test *ItemMarshalAndUnmarshalTest)
- func TestStore(t *testing.T, s storage.Store)
- func TestTxChunkStore(t *testing.T, store storage.TxChunkStore)
- func TestTxStore(t *testing.T, store storage.TxStore)
- type ItemCloneTest
- type ItemMarshalAndUnmarshalTest
- type ItemStub
Constants ¶
This section is empty.
Variables ¶
var ( // MinAddressBytes represents bytes that can be used to represent a min. address. MinAddressBytes = [swarm.HashSize]byte{swarm.HashSize - 1: 0x00} // MaxAddressBytes represents bytes that can be used to represent a max. address. MaxAddressBytes = [swarm.HashSize]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} MaxEncryptedRefBytes = [encryption.ReferenceSize]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} // MaxStampIndexBytes represents bytes that can be used to represent a max. stamp index. MaxStampIndexBytes = [swarm.StampIndexSize]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} // MaxBatchTimestampBytes represents bytes that can be used to represent a max. batch timestamp. MaxBatchTimestampBytes = [swarm.StampTimestampSize]byte{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} )
Functions ¶
func BenchmarkBatchedStore ¶
func BenchmarkBatchedStore(b *testing.B, bs storage.BatchedStore)
BenchmarkBatchedStore provides a benchmark suite for the storage.BatchedStore. Only the Write and Delete methods are tested.
func BenchmarkChunkStoreDeleteRandom ¶
func BenchmarkChunkStoreDeleteRandom(b *testing.B, s storage.ChunkStore)
func BenchmarkChunkStoreDeleteSequential ¶
func BenchmarkChunkStoreDeleteSequential(b *testing.B, s storage.ChunkStore)
func BenchmarkChunkStoreIterateReverse ¶
func BenchmarkChunkStoreIterateReverse(b *testing.B, s storage.ChunkStore)
func BenchmarkChunkStoreIterateSequential ¶
func BenchmarkChunkStoreIterateSequential(b *testing.B, s storage.ChunkStore)
func BenchmarkChunkStoreReadHot ¶
func BenchmarkChunkStoreReadHot(b *testing.B, s storage.ChunkStore)
func BenchmarkChunkStoreReadRandom ¶
func BenchmarkChunkStoreReadRandom(b *testing.B, s storage.ChunkStore)
func BenchmarkChunkStoreReadRandomMissing ¶
func BenchmarkChunkStoreReadRandomMissing(b *testing.B, s storage.ChunkStore)
func BenchmarkChunkStoreReadReverse ¶
func BenchmarkChunkStoreReadReverse(b *testing.B, db storage.ChunkStore)
func BenchmarkChunkStoreReadSequential ¶
func BenchmarkChunkStoreReadSequential(b *testing.B, s storage.ChunkStore)
func BenchmarkDeleteInBatches ¶
func BenchmarkDeleteInBatches(b *testing.B, bs storage.BatchedStore)
func BenchmarkDeleteInFixedSizeBatches ¶
func BenchmarkDeleteInFixedSizeBatches(b *testing.B, bs storage.BatchedStore)
func BenchmarkWriteInBatches ¶
func BenchmarkWriteInBatches(b *testing.B, bs storage.BatchedStore)
func BenchmarkWriteInFixedSizeBatches ¶
func BenchmarkWriteInFixedSizeBatches(b *testing.B, bs storage.BatchedStore)
func RunChunkStoreBenchmarkTests ¶
func RunChunkStoreBenchmarkTests(b *testing.B, s storage.ChunkStore)
func TestBatchedStore ¶
func TestBatchedStore(t *testing.T, bs storage.BatchedStore)
func TestChunkStore ¶
func TestChunkStore(t *testing.T, st storage.ChunkStore)
TestChunkStore runs a correctness test suite on a given ChunkStore.
func TestItemClone ¶
func TestItemClone(t *testing.T, test *ItemCloneTest)
TestItemClone provides correctness testsuite for storage.Item clone capabilities.
func TestItemMarshalAndUnmarshal ¶
func TestItemMarshalAndUnmarshal(t *testing.T, test *ItemMarshalAndUnmarshalTest)
TestItemMarshalAndUnmarshal provides correctness testsuite for storage.Item serialization and deserialization.
func TestTxChunkStore ¶
func TestTxChunkStore(t *testing.T, store storage.TxChunkStore)
TestTxChunkStore provides correctness testsuite for storage.TxChunkStore interface.
Types ¶
type ItemCloneTest ¶
ItemCloneTest represents a test case for the TestItemClone function.
type ItemMarshalAndUnmarshalTest ¶
type ItemMarshalAndUnmarshalTest struct { Item storage.Item Factory func() storage.Item MarshalErr error // Expected error from Marshal. UnmarshalErr error // Expected error from Unmarshal. CmpOpts []cmp.Option }
ItemMarshalAndUnmarshalTest represents a test case for the TestItemMarshalAndUnmarshal function.
type ItemStub ¶
ItemStub is a stub for storage.Item.