jobreports

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	ID                 string
	User               string
	Account            string
	Partition          string
	Status             JobStatus
	StartTime          time.Time
	WallTime           time.Duration
	RunTime            time.Duration
	CPUs               int
	RAM                float64 // in GB
	GPUs               int
	PendingTime        time.Duration
	CPUEfficiency      float64 // in percentage
	RAMEfficiency      float64 // in percentage
	WallTimeEfficiency float64 // in percentage
}

Job represents a job report entry with its details.

type JobStatus

type JobStatus string

JobStatus represents the status of a job.

const (
	StatusCompleted JobStatus = "COMPLETED"
)

type ReportData

type ReportData struct {
	Jobs        []*Job
	TotalJobs   int
	LastUpdated time.Time
}

ReportData holds the parsed data from the job report.

func ParseJobReport

func ParseJobReport(r io.Reader) (*ReportData, error)

ParseJobReport parses job report data from a Reader and returns a ReportData struct.

func ParseJobReportFile

func ParseJobReportFile(filename string) (*ReportData, error)

ParseJobReportFile parses a job report file and returns a ReportData struct.

type Resource

type Resource struct {
	Name  string
	Value float64
}

Resource represents a resource with a name and value.

Jump to

Keyboard shortcuts

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