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) (opt int, err 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.
func GetCPUTime ¶
func GetCPUTime() int64
GetCPUTime returns the how much CPU time has passed since the start of this process.
func GetTCPUserTimeout ¶
GetTCPUserTimeout gets the TCP user timeout on a connection's socket
func SetTCPUserTimeout ¶
SetTCPUserTimeout sets the TCP user timeout on a connection's socket
Types ¶
type Rusage ¶
Rusage is an alias for syscall.Rusage under linux environment.
func GetRusage ¶
func GetRusage() *Rusage
GetRusage returns the resource usage of current process.
Source Files ¶
syscall_linux.go
- Version
- v1.70.0 (latest)
- Published
- Jan 23, 2025
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 2 minutes ago –
Tools for package owners.