test

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package test contains storage benchmarks. Not used in production.

Package test contains storage tests. Not used in production.

Package test contains generated data for storage tests. Not used in production.

Index

Constants

This section is empty.

Variables

View Source
var PeerEqualityFunc = func(p1, p2 bittorrent.Peer) bool {
	return p1.Port() == p2.Port() &&
		p1.Addr().Compare(p1.Addr()) == 0 &&
		p1.ID == p2.ID
}

PeerEqualityFunc is the boolean function to use to check two Peers for equality. Depending on the implementation of the PeerStorage, this can be changed to use (Peer).EqualEndpoint instead.

Functions

func RunBenchmarks

func RunBenchmarks(b *testing.B, newStorage benchStorageConstructor)

RunBenchmarks starts series of benchmarks

func RunTests

func RunTests(t *testing.T, p storage.PeerStorage)

RunTests tests a PeerStorage implementation against the interface.

Types

This section is empty.

Jump to

Keyboard shortcuts

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