func (fs FS) PSIStatsForResource(resource string) (PSIStats, error) {
	data, err := util.ReadFileNoStat(fs.proc.Path(fmt.Sprintf("%s/%s", "pressure", resource)))
	if err != nil {
		return PSIStats{}, fmt.Errorf("psi_stats: unavailable for %s", resource)
	}
	return parsePSIStats(resource, bytes.NewReader(data))
}
PSIStatsForResource reads pressure stall information for the specified
resource from /proc/pressure/<resource>. At time of writing this can be
either "cpu", "memory" or "io".
package procfs
import (
	"bufio"
	"bytes"
	"fmt"
	"io"
	"strings"
	"github.com/prometheus/procfs/internal/util"
)
const lineFormat = "avg10=%f avg60=%f avg300=%f total=%d"
type PSILine struct {
	Avg10  float64
	Avg60  float64
	Avg300 float64
	Total  uint64
}
type PSIStats struct {
	Some *PSILine
	Full *PSILine
}