tester

package module
v0.0.0-...-81faf7d Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusOK  = "OK"
	StatusTLE = "TLE"
	StatusMLE = "MLE"
	StatusRE  = "RE"
)

Variables

This section is empty.

Functions

func DockerCasePath

func DockerCasePath(caseId int64) string

func DockerOutputPath

func DockerOutputPath(caseId int64) string

func DockerResultFile

func DockerResultFile() string

func Exists

func Exists(path string) bool

func TestOne

func TestOne(
	testResult *TestResult,
	i, timeLimit, spaceLimit int64,
	execCommand string,
	execArgs []string)

func Tester

func Tester()

Types

type Stat

type Stat struct {
	// contains filtered or unexported fields
}

type SysInfo

type SysInfo struct {
	CPU    float64
	Memory float64
}

func GetStat

func GetStat(pid int) (*SysInfo, error)

type TestResult

type TestResult struct {
	CaseId    int64  `json:"case_id"`
	Status    string `json:"status"`
	TimeUsed  uint32 `json:"time_used"`
	SpaceUsed uint32 `json:"space_used"`
}

Jump to

Keyboard shortcuts

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