Documentation ¶
Index ¶
- Constants
- type CSVWriter
- type Platform
- type ResultCollector
- type TCPCollector
- type Trace
- func (*Trace) Descriptor() ([]byte, []int)
- func (m *Trace) GetArgs() []string
- func (m *Trace) GetBootTime() *timestamp.Timestamp
- func (m *Trace) GetChildOf() string
- func (m *Trace) GetCodeVersion() string
- func (m *Trace) GetConfigVersion() string
- func (m *Trace) GetContainerID() string
- func (m *Trace) GetCost() float32
- func (m *Trace) GetEndTime() *timestamp.Timestamp
- func (m *Trace) GetEnv() map[string]string
- func (m *Trace) GetExecutionDelay() *duration.Duration
- func (m *Trace) GetExecutionLatency() *duration.Duration
- func (m *Trace) GetHostID() string
- func (m *Trace) GetID() string
- func (m *Trace) GetLogs() map[uint64]string
- func (m *Trace) GetMemory() int32
- func (m *Trace) GetPlatform() string
- func (m *Trace) GetRegion() string
- func (m *Trace) GetRequestEndTime() *timestamp.Timestamp
- func (m *Trace) GetRequestResponseLatency() *duration.Duration
- func (m *Trace) GetRequestStartTime() *timestamp.Timestamp
- func (m *Trace) GetRuntime() string
- func (m *Trace) GetStartTime() *timestamp.Timestamp
- func (m *Trace) GetStatus() int32
- func (m *Trace) GetTags() map[string]string
- func (m *Trace) GetTimestamp() *timestamp.Timestamp
- func (m *Trace) GetTransportDelay() *duration.Duration
- func (t *Trace) Merge(partial *Trace) error
- func (*Trace) ProtoMessage()
- func (m *Trace) Reset()
- func (m *Trace) String() string
- func (m *Trace) XXX_DiscardUnknown()
- func (m *Trace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Trace) XXX_Merge(src proto.Message)
- func (m *Trace) XXX_Size() int
- func (m *Trace) XXX_Unmarshal(b []byte) error
- type TraceObserver
- type TraceWriter
Constants ¶
View Source
const ( AWS Platform = "AWS" // AWS Lambda ICF = "ICF" // IBM Cloud Functions GCF = "GCF" // Google Cloud Functions ACF = "ACF" // Microsoft Azure Cloud Functions OW = "OW" // OpenWhisk )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResultCollector ¶
func NewCollector ¶
func NewCollector() *ResultCollector
func (*ResultCollector) Add ¶
func (c *ResultCollector) Add(t *Trace)
func (*ResultCollector) AddObserver ¶
func (c *ResultCollector) AddObserver(observer TraceObserver)
func (*ResultCollector) Close ¶
func (c *ResultCollector) Close()
func (*ResultCollector) GetTraces ¶
func (c *ResultCollector) GetTraces() []*Trace
func (*ResultCollector) Write ¶
func (c *ResultCollector) Write(writer TraceWriter) error
Write merges and writes all collected traces to the provider provider. Warning! This action will delete all collected traces after successful write operations.
type TCPCollector ¶
type TCPCollector struct { *ResultCollector // contains filtered or unexported fields }
func NewTCPCollector ¶
func NewTCPCollector(port, worker, maxConnections int) *TCPCollector
func (*TCPCollector) Close ¶
func (t *TCPCollector) Close()
func (*TCPCollector) Listen ¶
func (t *TCPCollector) Listen()
type Trace ¶
type Trace struct { //unique identifier of this trace ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` //a reference to the invoking function, can be empty ChildOf string `protobuf:"bytes,2,opt,name=ChildOf,proto3" json:"ChildOf,omitempty"` //time this trace was created Timestamp *timestamp.Timestamp `protobuf:"bytes,3,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` //unique identifier of the computation runtime ContainerID string `protobuf:"bytes,4,opt,name=ContainerID,proto3" json:"ContainerID,omitempty"` //unique identifier for the computation host HostID string `protobuf:"bytes,5,opt,name=HostID,proto3" json:"HostID,omitempty"` //the first time the computation runtime was started BootTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=BootTime,proto3" json:"BootTime,omitempty"` //cost for the execution Cost float32 `protobuf:"fixed32,7,opt,name=Cost,proto3" json:"Cost,omitempty"` //time the request started (sending of first byte) RequestStartTime *timestamp.Timestamp `protobuf:"bytes,21,opt,name=RequestStartTime,proto3" json:"RequestStartTime,omitempty"` //time the execution started StartTime *timestamp.Timestamp `protobuf:"bytes,8,opt,name=StartTime,proto3" json:"StartTime,omitempty"` //return status, analogous to http status codes Status int32 `protobuf:"varint,9,opt,name=Status,proto3" json:"Status,omitempty"` //time the execution completed EndTime *timestamp.Timestamp `protobuf:"bytes,10,opt,name=EndTime,proto3" json:"EndTime,omitempty"` //time the first byte of the request is received RequestEndTime *timestamp.Timestamp `protobuf:"bytes,22,opt,name=RequestEndTime,proto3" json:"RequestEndTime,omitempty"` //unique version of the deployed artefact (should increase only for code change) CodeVersion string `protobuf:"bytes,25,opt,name=CodeVersion,proto3" json:"CodeVersion,omitempty"` //unique version of the deployed configuration (should change if part of the direct configuration is changed) ConfigVersion string `protobuf:"bytes,26,opt,name=ConfigVersion,proto3" json:"ConfigVersion,omitempty"` //platform identifier Platform string `protobuf:"bytes,11,opt,name=Platform,proto3" json:"Platform,omitempty"` //region identifier Region string `protobuf:"bytes,12,opt,name=Region,proto3" json:"Region,omitempty"` //runtime identifier, including a version Runtime string `protobuf:"bytes,13,opt,name=Runtime,proto3" json:"Runtime,omitempty"` //configured available memory Memory int32 `protobuf:"varint,14,opt,name=Memory,proto3" json:"Memory,omitempty"` //Time before an execution ExecutionDelay *duration.Duration `protobuf:"bytes,23,opt,name=ExecutionDelay,proto3" json:"ExecutionDelay,omitempty"` //duration of execution ExecutionLatency *duration.Duration `protobuf:"bytes,15,opt,name=ExecutionLatency,proto3" json:"ExecutionLatency,omitempty"` //time until the result is send to the receiver TransportDelay *duration.Duration `protobuf:"bytes,24,opt,name=TransportDelay,proto3" json:"TransportDelay,omitempty"` //duration from sending the request until receiving the last byte of the request RequestResponseLatency *duration.Duration `protobuf:"bytes,20,opt,name=RequestResponseLatency,proto3" json:"RequestResponseLatency,omitempty"` //map of set enviroment variables. CAUTION, this can contain senstive information only populate if necessary! Env map[string]string `` /* 148-byte string literal not displayed */ //flexible set of tags than can be used as a ad-hoc extension (will be ignored by most collectors) Tags map[string]string `` /* 150-byte string literal not displayed */ //logs that can be set during execution. CAUTION use sparingly as it increase the size of the trace Logs map[uint64]string `` /* 151-byte string literal not displayed */ //strings that can be added to the trace, useful to collect execution results. CAUTION use sparingly as it increase the size of the trace Args []string `protobuf:"bytes,19,rep,name=Args,proto3" json:"Args,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Trace) Descriptor ¶
func (*Trace) GetBootTime ¶
func (*Trace) GetChildOf ¶
func (*Trace) GetCodeVersion ¶
func (*Trace) GetConfigVersion ¶
func (*Trace) GetContainerID ¶
func (*Trace) GetEndTime ¶
func (*Trace) GetExecutionDelay ¶
func (*Trace) GetExecutionLatency ¶
func (*Trace) GetPlatform ¶
func (*Trace) GetRequestEndTime ¶
func (*Trace) GetRequestResponseLatency ¶
func (*Trace) GetRequestStartTime ¶
func (*Trace) GetRuntime ¶
func (*Trace) GetStartTime ¶
func (*Trace) GetTimestamp ¶
func (*Trace) GetTransportDelay ¶
func (*Trace) Merge ¶
merge a partial trace with the same TraceID to this trace. Older timestamps have precidence.
func (*Trace) ProtoMessage ¶
func (*Trace) ProtoMessage()
func (*Trace) XXX_DiscardUnknown ¶
func (m *Trace) XXX_DiscardUnknown()
func (*Trace) XXX_Marshal ¶
func (*Trace) XXX_Unmarshal ¶
type TraceObserver ¶
type TraceObserver interface { Observe(trace *Trace) // Close() }
type TraceWriter ¶
type TraceWriter interface { Name() string //name of the writer, for ui purposes Open(io.Writer, bool) //attaches an io.writer used to write all traces to Write([]*Trace) error //writes the contens of a ResultCollector }
func NewCSVWriter ¶
func NewCSVWriter() TraceWriter
Click to show internal directories.
Click to hide internal directories.