statistics

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Overview

Package statistics provides the schema for the statistics section of the output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataPoint

type DataPoint struct {
	X Float64 `json:"x"`
	Y Float64 `json:"y"`
}

DataPoint is the structure of a time series datum.

type Float64

type Float64 float64

Float64 is a float64 that can be marshaled to and from JSON. It supports the special values NaN, +Inf, and -Inf.

func (Float64) MarshalJSON

func (f Float64) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Float64 to JSON.

func (Float64) String

func (f Float64) String() string

func (*Float64) UnmarshalJSON

func (f *Float64) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the Float64 from JSON.

type Result

type Result struct {
	Duration *float64 `json:"duration,omitempty"`
	Value    *Float64 `json:"value,omitempty"`
	Custom   any      `json:"custom,omitempty"`
}

Result is the structure of the result section of the statistics.

type Run

type Run struct {
	Duration   *float64 `json:"duration,omitempty"`
	Iterations *int     `json:"iterations,omitempty"`
	Custom     any      `json:"custom,omitempty"`
}

Run is the structure of the run section of the statistics.

type Series

type Series struct {
	Name       string      `json:"name,omitempty"`
	DataPoints []DataPoint `json:"data_points,omitempty"`
}

Series is the structure of a time series.

type SeriesData

type SeriesData struct {
	Value  Series   `json:"value,omitempty"`
	Custom []Series `json:"custom,omitempty"`
}

SeriesData is the structure of the series section of the statistics.

type Statistics

type Statistics struct {
	Schema     string      `json:"schema,omitempty"`
	Run        *Run        `json:"run,omitempty"`
	Result     *Result     `json:"result,omitempty"`
	SeriesData *SeriesData `json:"series_data,omitempty"`
}

Statistics is the structure of the statistics section of the output.

func NewStatistics

func NewStatistics() *Statistics

NewStatistics creates new statistics.

Jump to

Keyboard shortcuts

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