mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-19 20:46:40 +00:00
Upgrade to go-execute/v2
Upgrades to go-execute/v2 and updates various other dependencies. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
6
vendor/github.com/prometheus/procfs/proc_psi.go
generated
vendored
6
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