benchmark

package
v0.0.0-...-f3917cb Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package benchmark provides interfaces related to rebuild benchmarks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFSRepository

func NewFSRepository(fs billy.Filesystem) *fsRepository

Types

type Metadata

type Metadata struct {
	Count   int
	Updated time.Time
}

Metadata describes characteristics of a PackageSet.

type Package

type Package struct {
	Ecosystem string
	Name      string
	Versions  []string
	Artifacts []string
}

Package corresponds to one or more versions of a package to rebuild.

* Only the versions provided will be rebuilt. * All supported artifacts will be built for each provided version.

TODO: Possible extension of this form would include specific artifacts:

 {
   ...,
	  "artifacts": {"1.2.0": [...]},
 }

type PackageSet

type PackageSet struct {
	Metadata
	Packages []Package
}

PackageSet is a grouping of packages to evaluate rebuilds.

func ReadBenchmark

func ReadBenchmark(filename string) (ps PackageSet, err error)

func (*PackageSet) Hash

func (ps *PackageSet) Hash(h hash.Hash) []byte

Hash canonicalizes and returns a hash on its Packages using "h".

type Repository

type Repository interface {
	List() ([]string, error)
	Load(string) (PackageSet, error)
}

Directories

Path Synopsis
Package main implements a CLI tool to combine multiple benchmark files.
Package main implements a CLI tool to combine multiple benchmark files.
Package main generates rebuild benchmark files from external data sources.
Package main generates rebuild benchmark files from external data sources.

Jump to

Keyboard shortcuts

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