test

package
v0.8.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: Apache-2.0, MIT Imports: 13 Imported by: 0

Documentation

Overview

Package test provides tests and benchmarks that are usable by any store that implements store.Interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BenchMultihashGet

func BenchMultihashGet(s indexer.Interface, b *testing.B)

Benchmark single thread get operation

func BenchParallelMultihashGet

func BenchParallelMultihashGet(s indexer.Interface, b *testing.B)

func BenchReadAll

func BenchReadAll(s indexer.Interface, size string, t *testing.T)

Benchmark the average time per get by all multihashes and the total storage used.

func E2ETest

func E2ETest(t *testing.T, s indexer.Interface)

func ParallelUpdateTest

func ParallelUpdateTest(t *testing.T, s indexer.Interface)

func RandomMultihashes

func RandomMultihashes(n int) []multihash.Multihash

RandomMultihashes generates the specified number of random cids.

func ReadCids

func ReadCids(in io.Reader, out chan multihash.Multihash, done chan error)

ReadCids reads cids from an io.Reader and outputs their multihashes on a channel. Malformed cids are ignored.

func RemoveProviderContextTest

func RemoveProviderContextTest(t *testing.T, s indexer.Interface)

func RemoveProviderTest

func RemoveProviderTest(t *testing.T, s indexer.Interface)

func RemoveTest

func RemoveTest(t *testing.T, s indexer.Interface)

func SizeTest

func SizeTest(t *testing.T, s indexer.Interface)

func SkipStorage

func SkipStorage(t *testing.T)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL