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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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