bookkeeping

package
v0.0.0-...-900fa13 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2015 License: Apache-2.0 Imports: 8 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(task *model.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