aggregates

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reduce

func Reduce(metrics []string) func(*Stats, map[string]any)

func StatToValue

func StatToValue(metric string) func(s *Stats) float64

Types

type Stats

type Stats struct {
	Visitors       float64
	Visits         float64
	PageViews      float64
	ViewsPerVisits float64
	BounceRate     float64
	VisitDuration  float64
	Events         float64
	// contains filtered or unexported fields
}

func Aggregates

func Aggregates(ctx context.Context, ts *timeseries.Timeseries, domain string, start, end time.Time, interval query.Interval, filters query.Filters, metrics []string) (*Stats, error)

func NewStats

func NewStats(fs fieldset.Set) *Stats

func (*Stats) Compute

func (s *Stats) Compute()

func (*Stats) Read

func (d *Stats) Read(ctx context.Context, ts *timeseries.Timeseries, shard, view uint64, match *roaring.Bitmap, fields fieldset.Set) error

Jump to

Keyboard shortcuts

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