statistics

package
v1.29.1-beta2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IncIgnoredFieldsCount

func IncIgnoredFieldsCount()

func IncIgnoredLinesCount

func IncIgnoredLinesCount()

func IncIgnoredPathsCount

func IncIgnoredPathsCount()

func Reset

func Reset()

Reset all statistics to zero

func SetDuration added in v1.16.0

func SetDuration(duration time.Duration)

Types

type ExecutionStats

type ExecutionStats interface {
	WithErrorCode(ec int) ExecutionStats

	GetErrorCode() int
	GetIgnoredPathsCount() int  // counter for path not found in data
	GetIgnoredLinesCount() int  // counter for line skipped (flag --skip-line-on-error)
	GetIgnoredFieldsCount() int // counter for field skipped (flag --skip-field-on-error)
	GetDuration() time.Duration

	ToJSON() []byte
}

func Compute

func Compute() ExecutionStats

Compute current statistics and give a snapshot

func WithErrorCode added in v1.12.0

func WithErrorCode(ec int) ExecutionStats

Jump to

Keyboard shortcuts

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