bench

package
v0.0.0-...-174d8c4 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2017 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	Runner         commandrunner.CommandRunner
	GrootFSBinPath string
	StorePath      string
	Driver         string
	MetricsEnabled bool
	LogLevel       string
	Command        string
	BaseImages     []string
	Interval       int
	UseQuota       bool
	Concurrency    int
	TotalImages    int
	CreatedImages  chan string
	Done           chan bool
	Results        chan *Result
	StartTime      time.Time
	Duration       time.Duration

	RunCounter int
	Mutex      *sync.Mutex
}

func (*Job) Run

func (j *Job) Run() *Summary

type JobExecutor

type JobExecutor struct {
	Jobs []*Job
}

func (*JobExecutor) Run

func (e *JobExecutor) Run() Summary

type JsonPrinter

type JsonPrinter struct {
	// contains filtered or unexported fields
}

func NewJsonPrinter

func NewJsonPrinter(out, err io.Writer) *JsonPrinter

func (*JsonPrinter) Print

func (j *JsonPrinter) Print(summary Summary) error

type Printer

type Printer interface {
	Print(summary Summary) error
}

type Result

type Result struct {
	// Original error from grootfs if it occurrs
	Err error

	// Duration took by grootfs bin to run
	Duration time.Duration
}

type Summary

type Summary struct {
	TotalDuration        time.Duration `json:"total_duration"`
	ImagesPerSecond      float64       `json:"images_per_second"`
	RanWithQuota         bool          `json:"ran_with_quota"`
	RanWithParallelClean bool          `json:"ran_with_parallel_clean"`
	NumberOfCleans       int           `json:"number_of_cleans"`
	NumberOfDeletes      int           `json:"number_of_deletes"`
	AverageTimePerImage  float64       `json:"average_time_per_image"`
	TotalErrorsAmt       int           `json:"total_errors_amt"`
	ErrorRate            float64       `json:"error_rate"`
	TotalImages          int           `json:"total_images"`
	ConcurrencyFactor    int           `json:"concurrency_factor"`
	ErrorMessages        []string      `json:"-"`
}

Summary represents some metrics while running grootfs with given input

type TextPrinter

type TextPrinter struct {
	// contains filtered or unexported fields
}

func NewTextPrinter

func NewTextPrinter(out, err io.Writer) *TextPrinter

func (*TextPrinter) Print

func (p *TextPrinter) Print(summary Summary) error

Jump to

Keyboard shortcuts

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