mirror of
https://github.com/openfaas/faas.git
synced 2025-06-22 14:53:25 +00:00
Rename Makefile targets
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alex@openfaas.com>
This commit is contained in:
6
gateway/vendor/github.com/prometheus/procfs/proc_psi.go
generated
vendored
6
gateway/vendor/github.com/prometheus/procfs/proc_psi.go
generated
vendored
@ -61,14 +61,14 @@ type PSIStats struct {
|
||||
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 %q: %w", resource, err)
|
||||
return PSIStats{}, fmt.Errorf("%s: psi_stats: unavailable for %q: %w", ErrFileRead, resource, err)
|
||||
}
|
||||
|
||||
return parsePSIStats(resource, bytes.NewReader(data))
|
||||
return parsePSIStats(bytes.NewReader(data))
|
||||
}
|
||||
|
||||
// parsePSIStats parses the specified file for pressure stall information.
|
||||
func parsePSIStats(resource string, r io.Reader) (PSIStats, error) {
|
||||
func parsePSIStats(r io.Reader) (PSIStats, error) {
|
||||
psiStats := PSIStats{}
|
||||
|
||||
scanner := bufio.NewScanner(r)
|
||||
|
Reference in New Issue
Block a user