feat: show proc peak [force build]
This commit is contained in:
parent
44446f91c1
commit
b809488c71
|
@ -147,8 +147,9 @@ func convertPBResult(res []*pb.Response_Result) []stage.ExecutorResult {
|
||||||
ExitStatus: int(r.ExitStatus),
|
ExitStatus: int(r.ExitStatus),
|
||||||
Error: r.Error,
|
Error: r.Error,
|
||||||
Time: r.Time,
|
Time: r.Time,
|
||||||
RunTime: r.RunTime,
|
|
||||||
Memory: r.Memory,
|
Memory: r.Memory,
|
||||||
|
RunTime: r.RunTime,
|
||||||
|
ProcPeak: r.ProcPeak,
|
||||||
Files: convertFiles(r.Files),
|
Files: convertFiles(r.Files),
|
||||||
Buffs: r.Files,
|
Buffs: r.Files,
|
||||||
FileIDs: r.FileIDs,
|
FileIDs: r.FileIDs,
|
||||||
|
|
|
@ -13,6 +13,7 @@ type Conf struct {
|
||||||
ShowTime bool `default:"true"`
|
ShowTime bool `default:"true"`
|
||||||
ShowMemory bool `default:"true"`
|
ShowMemory bool `default:"true"`
|
||||||
ShowRunTime bool `default:"false"`
|
ShowRunTime bool `default:"false"`
|
||||||
|
ShowProcPeak bool `default:"false"`
|
||||||
ShowFiles []string
|
ShowFiles []string
|
||||||
FilesInCodeBlock bool `default:"true"`
|
FilesInCodeBlock bool `default:"true"`
|
||||||
MaxFileLength int `default:"2048"`
|
MaxFileLength int `default:"2048"`
|
||||||
|
|
|
@ -39,6 +39,9 @@ func (*ResultDetail) Run(results []stage.ExecutorResult, confAny any) (
|
||||||
if conf.ShowRunTime {
|
if conf.ShowRunTime {
|
||||||
comment += fmt.Sprintf("RunTime: `%d ms`\n", result.RunTime/1e6)
|
comment += fmt.Sprintf("RunTime: `%d ms`\n", result.RunTime/1e6)
|
||||||
}
|
}
|
||||||
|
if conf.ShowProcPeak {
|
||||||
|
comment += fmt.Sprintf("ProcPeak: `%d`\n", result.ProcPeak)
|
||||||
|
}
|
||||||
for _, file := range conf.ShowFiles {
|
for _, file := range conf.ShowFiles {
|
||||||
content, ok := result.Files[file]
|
content, ok := result.Files[file]
|
||||||
comment += fmt.Sprintf("File `%s`:\n", file)
|
comment += fmt.Sprintf("File `%s`:\n", file)
|
||||||
|
|
|
@ -25,6 +25,7 @@ type ExecutorResult struct {
|
||||||
Time uint64 `json:"time"` // ns (cgroup recorded time)
|
Time uint64 `json:"time"` // ns (cgroup recorded time)
|
||||||
Memory uint64 `json:"memory"` // byte
|
Memory uint64 `json:"memory"` // byte
|
||||||
RunTime uint64 `json:"runTime"` // ns (wall clock time)
|
RunTime uint64 `json:"runTime"` // ns (wall clock time)
|
||||||
|
ProcPeak uint64 `json:"procPeak"`
|
||||||
Files map[string]string `json:"files,omitempty"`
|
Files map[string]string `json:"files,omitempty"`
|
||||||
FileIDs map[string]string `json:"fileIds,omitempty"`
|
FileIDs map[string]string `json:"fileIds,omitempty"`
|
||||||
FileError []FileError `json:"fileError,omitempty"`
|
FileError []FileError `json:"fileError,omitempty"`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user