utils

package
v0.0.0-...-0c34cbd Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerWorkloadToFloatArray

func ContainerWorkloadToFloatArray(workloads []*core.ContainerWorkloadData) [][]float32

func GetSortedPositionValue

func GetSortedPositionValue(arr []float32, pos int) float32

func Partition

func Partition(arr []float32, l, r int) int

func RecordToContainerWorkloadData

func RecordToContainerWorkloadData(record []string) (*core.ContainerWorkloadData, error)

func RecordsToSectionArray

func RecordsToSectionArray(record []string) ([]*core.SectionData, error)

func SectionDataToFloatArray

func SectionDataToFloatArray(sectionData []*core.SectionData) []float32

func WorkloadDataToStringRecord

func WorkloadDataToStringRecord(data *core.ContainerWorkloadData) []string

func WriteContainerWorkloadData

func WriteContainerWorkloadData(out io.Writer, data []*core.ContainerWorkloadData) error

func WriteContainerWorkloadHeader

func WriteContainerWorkloadHeader(out io.Writer) error

Types

type ReadCounter

type ReadCounter struct {
	Count  int
	Reader io.Reader
}

func (ReadCounter) Read

func (r ReadCounter) Read(p []byte) (n int, err error)

type WriterCounter

type WriterCounter struct {
	Writer io.Writer
	Count  uint64
}

func (*WriterCounter) Write

func (w *WriterCounter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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