core

package
v0.0.0-...-00dc8c7 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultT               = 24
	DefaultSlotLength      = 60              //second
	DefaultRevisitTime     = 1000000000 * 60 //nano second
	DefaultCarbonIntensity = 475
	DefaultRunTime         = 1
)

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Name        string
	GeoLocation string
	Carbon      []float64
	CPU         float64
	GPU         float64
	PowerSlope  float64
}

Each Cluster instance represents a clusterinfo object in hub.

type Job

type Job struct {
	Name            string
	Namespace       string
	Deadline        int64
	CPU             float64
	GPU             float64
	RunTime         int64
	RemainTime      int64
	PreferedCluster string
}

type Weights

type Weights map[v1.ResourceName]*inf.Dec

func NewWeights

func NewWeights(r v1.ResourceList) Weights

Converts a ResourceList to Weights

func (Weights) AddProd

func (w Weights) AddProd(coefficient int32, r Weights)

/ Add coefficient * weights to receiver

type Weights2

type Weights2 map[v1.ResourceName]float64

func NewWeights2

func NewWeights2(r v1.ResourceList) Weights2

Converts a ResourceList to Weights

func (Weights2) AddProd2

func (w Weights2) AddProd2(coefficient int32, r Weights2)

/ Add coefficient * weights to receiver

Jump to

Keyboard shortcuts

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