Help us shape the future of Go! Take the 2026 Go Developer Survey

collector

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COLLECT_REQUEST = 0x0001
	COLLECT_PERSIST = 0x0002
)

Variables

View Source
var (
	S3Bucket string

	Prefix       string
	HostName     string
	FunctionName string
	Enables      int32 = COLLECT_PERSIST
	Lifetime     *lifetime.Lifetime
	Session      *lifetime.Session
)

Functions

func AddCommit

func AddCommit(ts time.Time, op int, t int, id uint64, backKey int, d1, d2, d time.Duration, b1, b2 int)

func AddRecovery

func AddRecovery(ts time.Time, op int, t int, id uint64, backKey int, d1, d2, d time.Duration, b1, b2, o int)

func AddRequest

func AddRequest(ts time.Time, op int, status, reqId, chunk string, d1, d2, d, dp time.Duration, session string)

func Collect

func Collect(session *lifetime.Session)

func Save

func Save()

func SaveWithOption

func SaveWithOption(snapshot bool)

func Send

func Send(entry DataEntry)

Types

type DataEntry

type DataEntry interface {
	WriteTo(*bytes.Buffer)
}

type PersistEntry

type PersistEntry struct {
	Time         time.Time
	Op           int
	Type         int
	Id           uint64
	BackupId     int
	DLineage     time.Duration // Duration for lambda to handle request.
	DObjects     time.Duration // Duration for lambda to transmit response.
	Duration     time.Duration // Duration for lambda side latency.
	BytesLineage int
	BytesObjects int
	Objects      int
	Session      string
}

For requests

func (*PersistEntry) WriteTo

func (e *PersistEntry) WriteTo(buf *bytes.Buffer)

type RequestEntry

type RequestEntry struct {
	Time      time.Time
	Op        int
	Status    string
	ReqId     string
	ChunkId   string
	DHandling time.Duration // Duration for lambda to handle request.
	DResponse time.Duration // Duration for lambda to transmit response.
	Duration  time.Duration // Duration for lambda side latency.
	DPost     time.Duration // Duration for post handling
	Session   string
}

For requests

func (*RequestEntry) WriteTo

func (e *RequestEntry) WriteTo(buf *bytes.Buffer)

Jump to

Keyboard shortcuts

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