benchcluster

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package benchcluster gives benchmark binaries one FoundationDB cluster file.

With FDB_BENCH_CLUSTER_FILE set, every benchmark in the process uses that existing cluster and no container is started; the cluster is never written to here. Unset, the first caller starts one FoundationDB container (API 730), as the classic benchmarks do, and Shutdown stops it.

Index

Constants

View Source
const EnvClusterFile = "FDB_BENCH_CLUSTER_FILE"

EnvClusterFile names an existing cluster file for every benchmark in the process.

Variables

This section is empty.

Functions

func ClusterFile

func ClusterFile(tb testing.TB) string

ClusterFile returns the process's cluster file, starting the fallback container on first use when EnvClusterFile is unset.

func External

func External() bool

External reports whether the process uses EnvClusterFile. It is meaningful after ClusterFile.

func Main

func Main(m *testing.M) int

Main runs m and then Shutdown, reporting a cleanup failure as a failure.

func Shutdown

func Shutdown() error

Shutdown stops a container ClusterFile started and removes its cluster file. An external cluster is left untouched. Call it from TestMain after m.Run; it returns the cleanup failure, if any.

Types

This section is empty.

Jump to

Keyboard shortcuts

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