bookkeeping

package
v0.0.0-...-ee3d319 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultGuessDur           = time.Minute * 20
	TaskBookkeepingCollection = "task_bk"
)

Variables

This section is empty.

Functions

func UpdateExpectedDuration

func UpdateExpectedDuration(t *task.Task, timeTaken time.Duration) error

update the expected duration that we expect the given task to take when run on the given host

Types

type TaskBookkeeping

type TaskBookkeeping struct {
	// standard object id
	Id bson.ObjectId `bson:"_id"`

	// info that tasks with the same guessed duration will share
	Name         string `bson:"name"`
	BuildVariant string `bson:"build_variant"`
	HostType     string `bson:"host_type"` // may change to an enum once Host.HostType changes
	Project      string `bson:"branch"`

	// the duration we expect the task to take
	ExpectedDuration time.Duration `bson:"expected_duration"`

	// the number of times this task - as defined by the
	// buildvariant and task name - has been started
	NumStarted int64 `bson:"num_started"`
}

Jump to

Keyboard shortcuts

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