forked from forgejo/forgejo
Update swagger to 0.20.1 (#8010)
* update swagger to 0.20.1 * fiw swagger version for validate
This commit is contained in:
parent
e0f95d1545
commit
256b178176
100 changed files with 6410 additions and 1259 deletions
17
vendor/github.com/prometheus/procfs/proc_psi.go
generated
vendored
17
vendor/github.com/prometheus/procfs/proc_psi.go
generated
vendored
|
@ -51,19 +51,10 @@ type PSIStats struct {
|
|||
Full *PSILine
|
||||
}
|
||||
|
||||
// NewPSIStatsForResource reads pressure stall information for the specified
|
||||
// resource. At time of writing this can be either "cpu", "memory" or "io".
|
||||
func NewPSIStatsForResource(resource string) (PSIStats, error) {
|
||||
fs, err := NewFS(DefaultMountPoint)
|
||||
if err != nil {
|
||||
return PSIStats{}, err
|
||||
}
|
||||
|
||||
return fs.NewPSIStatsForResource(resource)
|
||||
}
|
||||
|
||||
// NewPSIStatsForResource reads pressure stall information from /proc/pressure/<resource>
|
||||
func (fs FS) NewPSIStatsForResource(resource string) (PSIStats, error) {
|
||||
// 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".
|
||||
func (fs FS) PSIStatsForResource(resource string) (PSIStats, error) {
|
||||
file, err := os.Open(fs.proc.Path(fmt.Sprintf("%s/%s", "pressure", resource)))
|
||||
if err != nil {
|
||||
return PSIStats{}, fmt.Errorf("psi_stats: unavailable for %s", resource)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue