meta

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MNdt   MeasureNdt
	MOokla MeasureOokla

	MSamples       = make(map[int]RttSample)
	MBytes   int64 = 0

	MMeta Meta
	MetaD Metadata

	MetaFile string
)

Functions

func Collect

func Collect()

func Init

func Init()

func ToString

func ToString() (string, error)

func Write

func Write()

Types

type MeasureNdt

type MeasureNdt struct {
	Download        float64 `json:"speedtest_ndt7_download"`
	DownloadLatency float64 `json:"speedtest_ndt7_downloadlatency"`
	DownloadRetrans float64 `json:"speedtest_ndt7_downloadretrans"`
	Server          string  `json:"speedtest_ndt7_server"`
	ServerIP        net.IP  `json:"speedtest_ndt7_server_ip"`
	Upload          float64 `json:"speedtest_ndt7_upload"`
}

type MeasureOokla

type MeasureOokla struct {
	Download   float64 `json:"speedtest_ookla_download"`
	Jitter     float64 `json:"speedtest_ookla_jitter"`
	Latency    float64 `json:"speedtest_ookla_latency"`
	PktLoss2   float64 `json:"speedtest_ookla_pktloss2"`
	ServerHost string  `json:"speedtest_ookla_server_host"`
	ServerId   int     `json:"speedtest_ookla_server_id"`
	ServerName string  `json:"speedtest_ookla_server_name"`
	Upload     float64 `json:"speedtest_ookla_upload"`
}

type Measurements

type Measurements struct {
	Ndt7          *MeasureNdt   `json:"ndt7,omitempty"`
	Ookla         *MeasureOokla `json:"ookla,omitempty"`
	RttSamples    []RttSample   `json:"rtt_samples"`
	BytesConsumed int64         `json:"test_bytes_consumed"`
}

type Meta

type Meta struct {
	ID                 string   `json:"Id"`
	Time               float64  `json:"Time"`
	ToolStartTime      float64  `json:"Tool_start_time"`
	ToolEndTime        float64  `json:"Tool_end_time"`
	SpeedtestStartTime float64  `json:"Speedtest_start_time"`
	SpeedtestEndTime   float64  `json:"Speedtest_end_time"`
	PingStartTime      float64  `json:"Ping_start_time"`
	PingEndTime        float64  `json:"Ping_end_time"`
	Interface          string   `json:"Interface"`
	InterfaceIP        []net.IP `json:"Interface_ip"`
}

type Metadata

type Metadata struct {
	Measurements Measurements `json:"Measurements"`
	Meta         Meta         `json:"Meta"`
}

type RttSample

type RttSample struct {
	TTL         int     `json:"ttl"`
	Round       int     `json:"round"`
	ReplyIP     net.IP  `json:"reply_ip"`
	SendTime    float64 `json:"send_time"`
	RecvTime    float64 `json:"recv_time"`
	RTT         float64 `json:"rtt"`
	IcmpSeqNo   *int    `json:"icmp_seq_no,omitempty"`
	UdpDestPort *int    `json:"udp_dest_port,omitempty"`
}

Jump to

Keyboard shortcuts

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