bench

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package bench holds the shared benchmark fixture matrix and helpers used by both the Go-benchmark layer (bench/*_test.go) and the cross-language compare harness (cmd/bench/compare).

Index

Constants

This section is empty.

Variables

View Source
var Matrix = []FormatEntry{
	{"svs", "svs/CMU-1.svs", true, true},
	{"ndpi", "ndpi/CMU-1.ndpi", true, true},
	{"philips-tiff", "philips-tiff/Philips-1.tiff", true, true},
	{"ome-tiff", "ome-tiff/Leica-1.ome.tiff", false, true},
	{"bif", "bif/Ventana-1.bif", true, false},
	{"ife", "ife/cervix_2x_jpeg.iris", false, false},
	{"generic-tiff", "generic-tiff/CMU-1.tiff", true, false},
	{"leica-scn", "scn/Leica-1.scn", true, false},
	{"szi", "szi/CMU-1.szi", false, false},
	{"cog-wsi", "cog-wsi/CMU-1_cog-wsi.tiff", false, false},
}

Matrix is the canonical benchmark fixture set: one representative fixture per supported format. Overlap flags drive the competitive axes; the harness still skips gracefully if a reader can't open a given fixture.

Functions

func FixturePath

func FixturePath(rel string) (string, bool)

FixturePath resolves an entry's fixture path and reports whether the file exists on disk.

func MpixPerSec

func MpixPerSec(pixels int64, d time.Duration) float64

MpixPerSec returns megapixels/second for pixels processed over d. Returns 0 for non-positive d (no division by zero).

Types

type FormatEntry

type FormatEntry struct {
	Format    string // opentile-go format id (matches Slide.Format())
	Fixture   string // path relative to OPENTILE_TESTDIR
	Openslide bool   // openslide can read it (competitive on ReadRegion)
	Python    bool   // python opentile can read it (competitive on Tile)
}

FormatEntry describes one format's representative benchmark fixture and which external references can also read it.

Jump to

Keyboard shortcuts

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