stats

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

The stats package exposes a structure to keep track of statistics for a solver run.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stats

type Stats struct {

	// The Solved member reports whether the solver actually got a solution.
	// If this is false, it means the solver timed out, either with a soft
	// timeout or a hard timeout.
	Solved bool

	// The IngestDuration member records how long it took to parse the file and
	// convert it to CNF.
	IngestDuration time.Duration
	// The PreprocessDuration member records how long preprocessing takes if
	// enabled.
	PreprocessDuration time.Duration
	// The SATSolverDuration member records the amount of time spent in the SAT
	// solver.
	SATSolverDuration time.Duration
	// The TheorySolverDuration member recrods the amount of time spent in the
	// theory solver.
	TheorySolverDuration time.Duration

	// The GraphOverheadDuration member records the amount of time taken to
	// construct the constraint graph.
	GraphOverheadDuration time.Duration
	// The LearnOverheadDuration member records how long it tooks to learn new
	// clauses from cycles.
	LearnOverheadDuration time.Duration

	// The SolverCalls member records how many times the SAT solver was
	// invoked. The number of times the theory solver was invoked is the same.
	SolverCalls uint64
	// The TheorySolverLoops member records how many O(1) loops took place
	// inside the theory solver. The precise meaning of this field will differ
	// depending on the solver.
	TheorySolverLoops uint64
	// contains filtered or unexported fields
}

The Stats struct stores statistics for one run.

func New

func New(csv bool) Stats

The New function creates a new Stats instance, with the specified method of printing.

func (Stats) String

func (stats Stats) String() string

The String implementation for Stats dumps the statistics. The result is either in human-readable format, or in CSV if the csv member is set.

Jump to

Keyboard shortcuts

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