Skip to content

Commit

Permalink
[cherry-pick for release-1.8]:feat:add printing of MemStats in dumpall
Browse files Browse the repository at this point in the history
Signed-off-by: 晓杰 <2561589453@qq.com>
  • Loading branch information
xiao-jay committed Sep 4, 2023
1 parent 326caaf commit 522e3bf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/scheduler/cache/dumper.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package cache
import (
"os"
"os/signal"
"runtime"
"strings"
"syscall"

Expand All @@ -45,6 +46,14 @@ func (d *Dumper) dumpAll() {
for _, jobInfo := range snapshot.Jobs {
klog.Info(d.printJobInfo(jobInfo))
}

d.displaySchedulerMemStats()
}

func (d *Dumper) displaySchedulerMemStats() {
var m runtime.MemStats
runtime.ReadMemStats(&m)
klog.Infof("volcano scheduler memory stat: %+v\n", m)
}

func (d *Dumper) printNodeInfo(node *api.NodeInfo) string {
Expand Down

0 comments on commit 522e3bf

Please sign in to comment.