evaluate

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatStringCSV

func FormatStringCSV(metricsPerModel map[string]Metrics) (string, error)

FormatStringCSV formats the given metrics as CSV.

Types

type Metrics

type Metrics struct {
	// Executed is the number of benchmarking candidates with successful execution.
	Executed uint
	// Problems is the number of benchmarking candidates with problems.
	Problems uint
	// Total is the total number of benchmarking candidates.
	Total uint

	// Coverage holds the coverage of the benchmarking candidates.
	Coverage []float64
}

Metrics holds numerical benchmarking metrics.

func EvaluateRepository

func EvaluateRepository(model model.Model, language language.Language, repositoryPath string) (metrics Metrics, problems []error, err error)

EvaluateRepository evaluate a repository with the given model and language.

func (Metrics) Add

func (m Metrics) Add(o Metrics) Metrics

Add sums two metrics objects.

func (Metrics) AverageCoverage

func (m Metrics) AverageCoverage() float64

AverageCoverage returns the average coverage.

func (Metrics) String

func (m Metrics) String() string

String returns a string representation of the metrics.

func (Metrics) StringCSV

func (m Metrics) StringCSV() []string

StringCSV returns a CSV row string representation of the metrics.

Jump to

Keyboard shortcuts

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