http_kprobe

package
v0.0.0-...-b65280e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gauge_Push

func Gauge_Push(podname string, statuscode int, gotime int64)

func GetHttpViaKprobe

func GetHttpViaKprobe(tracePID int, p string, exporterip string)

func Histogram_Push

func Histogram_Push(podname string, spendtime int64, gotime int64)

func PrintStatisticsNumber

func PrintStatisticsNumber(requestMap *RequestMap, spendtimeMap *SpendTimeMap)

Types

type Attributes

type Attributes struct {
	EvType  EventType
	Fd      int32
	Bytes   int32
	MsgSize int32
	StartNs int64
	EndNs   int64
}

type EventType

type EventType int32
const (
	ETSyscallAddr EventType = iota + 1
	ETSyscallWrite
	ETSyscallClose
)

type MessageInfo

type MessageInfo struct {
	GoTime     int64
	Time_ns    int64
	SocketInfo []byte
	Buf        bytes.Buffer
}

type RequestMap

type RequestMap struct {
	sync.RWMutex
	Request map[time.Time][]*http.Response
}

type SpendTimeMap

type SpendTimeMap struct {
	sync.RWMutex
	SpendTime map[time.Time][]int64
}

为Map上锁

type SyscallWriteEvent

type SyscallWriteEvent struct {
	Attr Attributes
	Msg  []byte
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL