Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PublishMetrics ¶
func PublishMetrics(results metrics.QueryResults)
PublishMetrics calculates the runtime and sends the result to InfluxDB database.
Types ¶
type RuntimeMonitor ¶
type RuntimeMonitor struct{}
RuntimeMonitor is a DoFn to record processing time in the pipeline.
It uses a distribution metric which is updated every time a new bundle starts or finishes. The processing time can be extracted by calculating the difference of the maximum and the minimum value of the distribution metric.
func (*RuntimeMonitor) FinishBundle ¶
func (fn *RuntimeMonitor) FinishBundle(ctx context.Context, emit func([]byte, []byte))
FinishBundle updates a distribution metric.
func (*RuntimeMonitor) ProcessElement ¶
func (fn *RuntimeMonitor) ProcessElement(key, value []byte, emit func([]byte, []byte))
ProcessElement emits unmodified input elements.
func (*RuntimeMonitor) StartBundle ¶
func (fn *RuntimeMonitor) StartBundle(ctx context.Context, emit func([]byte, []byte))
StartBundle updates a distribution metric.
Click to show internal directories.
Click to hide internal directories.