mirror of
https://github.com/opencontainers/runc.git
synced 2025-09-26 19:41:35 +08:00

gofumpt (mvdan.cc/gofumpt) is a fork of gofmt with stricter rules. Brought to you by git ls-files \*.go | grep -v ^vendor/ | xargs gofumpt -s -w Looking at the diff, all these changes make sense. Also, replace gofmt with gofumpt in golangci.yml. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
24 lines
455 B
Go
24 lines
455 B
Go
package intelrdt
|
|
|
|
var cmtEnabled bool
|
|
|
|
// Check if Intel RDT/CMT is enabled.
|
|
func IsCMTEnabled() bool {
|
|
featuresInit()
|
|
return cmtEnabled
|
|
}
|
|
|
|
func getCMTNumaNodeStats(numaPath string) (*CMTNumaNodeStats, error) {
|
|
stats := &CMTNumaNodeStats{}
|
|
|
|
if enabledMonFeatures.llcOccupancy {
|
|
llcOccupancy, err := getIntelRdtParamUint(numaPath, "llc_occupancy")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
stats.LLCOccupancy = llcOccupancy
|
|
}
|
|
|
|
return stats, nil
|
|
}
|