package syscall
import "google.golang.org/grpc/internal/syscall"
Package syscall provides functionalities that grpc uses to get low-level operating system stats/info.
Index ¶
- func CPUTimeDiff(first *Rusage, latest *Rusage) (float64, float64)
- func GetCPUTime() int64
- func GetTCPUserTimeout(conn net.Conn) (int, error)
- func SetTCPUserTimeout(conn net.Conn, timeout time.Duration) error
- type Rusage
Functions ¶
func CPUTimeDiff ¶
CPUTimeDiff returns the differences of user CPU time and system CPU time used between two Rusage structs. It a no-op function for non-linux environments.
func GetCPUTime ¶
func GetCPUTime() int64
GetCPUTime returns the how much CPU time has passed since the start of this process. It always returns 0 under non-linux environments.
func GetTCPUserTimeout ¶
GetTCPUserTimeout is a no-op function under non-linux environments. A negative return value indicates the operation is not supported
func SetTCPUserTimeout ¶
SetTCPUserTimeout is a no-op function under non-linux environments.
Types ¶
type Rusage ¶
type Rusage struct{}
Rusage is an empty struct under non-linux environments.
func GetRusage ¶
func GetRusage() *Rusage
GetRusage is a no-op function under non-linux environments.
Source Files ¶
syscall_nonlinux.go
- Version
- v1.58.2
- Published
- Sep 21, 2023
- Platform
- darwin/amd64
- Imports
- 4 packages
- Last checked
- 9 minutes ago –
Tools for package owners.