compute

package
v0.0.67 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Aggregate

func Aggregate(ctx context.Context, scan db.Scanner, req *v1.Aggregate_Request) (*v1.Aggregate_Response, error)

func Breakdown

func Breakdown(ctx context.Context, scan db.Scanner, req *v1.BreakDown_Request) (*v1.BreakDown_Response, error)

func CalVisits

func CalVisits(a *array.Boolean) int

We store sessions as boolean. True for new sessions and false otherwise. Visits is the same as the number of set bits.

func CalcBounce

func CalcBounce(a *array.Boolean) int

func HashProp

func HashProp(a arrow.Array) map[string]*roaring.Bitmap

func MetricsToProjection

func MetricsToProjection(f *v1.Filters, me []v1.Metric, props ...v1.Property) []string

func Realtime

func Realtime(ctx context.Context, scan db.Scanner, req *v1.Realtime_Request) (*v1.Realtime_Response, error)

func Take

func Take(ctx context.Context, a arrow.Array, idx *array.Uint32) (arrow.Array, error)

func Timeseries

func Timeseries(ctx context.Context, scan db.Scanner, req *v1.Timeseries_Request) (*v1.Timeseries_Response, error)

func ValidByPeriod

func ValidByPeriod(period *v1.TimePeriod, i v1.Interval) bool

Types

type Compute

type Compute struct {
	Mapping map[string]arrow.Array
	// contains filtered or unexported fields
}

func NewCompute

func NewCompute(r arrow.Record) *Compute

func (*Compute) Bounce

func (c *Compute) Bounce() float64

func (*Compute) BounceRate

func (c *Compute) BounceRate() float64

func (*Compute) Duration

func (c *Compute) Duration() float64

func (*Compute) Events

func (c *Compute) Events() float64

func (*Compute) Metric

func (c *Compute) Metric(ctx context.Context, m v1.Metric) (float64, error)

func (*Compute) PageView

func (c *Compute) PageView() float64

func (*Compute) Release

func (c *Compute) Release()

func (*Compute) Reset

func (c *Compute) Reset(r arrow.Record)

func (*Compute) ViewsPerVisits

func (c *Compute) ViewsPerVisits() float64

func (*Compute) VisitDuration

func (c *Compute) VisitDuration() float64

func (*Compute) Visitors

func (c *Compute) Visitors(ctx context.Context) (float64, error)

func (*Compute) Visits

func (c *Compute) Visits() float64

Jump to

Keyboard shortcuts

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