nodeselection

package
v0.0.0-...-bd1ce0c Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

README

Query to export nodes:

select * from nodes 
WHERE disqualified IS NULL
AND unknown_audit_suspended IS NULL
AND offline_suspended IS NULL
AND exit_initiated_at IS NULL
AND free_disk >= 5000000000
AND last_contact_success > current_timestamp() - INTERVAL '4 hours'

performance data:

SELECT tag_instance,tag_field, min(tag_value) as minimum,max(tag_value) as maximum, avg(tag_value) as average
FROM `storj-data-science-249814.eventkitd3.storj_io_statreceiver` WHERE 
TIMESTAMP_TRUNC(received_at, DAY) > TIMESTAMP("2024-06-01") 
AND tag_name = 'download_success_duration_ns'
AND tag_field != 'count'
group by tag_field,tag_name,tag_instance
order by tag_field,tag_name, tag_instance

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Nodeselection

type Nodeselection struct {
	Simulator Simulator `cmd:"" helm:"simulate different node selections"`
}

type PerformanceRecord

type PerformanceRecord struct {
	TagInstance string `json:"tag_instance"`
	TagField    string `json:"tag_field"`
	Minimum     string `json:"minimum"`
	Maximum     string `json:"maximum"`
	Average     string `json:"average"`
}

type Simulator

type Simulator struct {
	Nodes            string `help:"csv file with the node table export"`
	Performance      string `help:"csv file with the node performance data"`
	Selector         string `help:"selector definition" default:"random()"`
	Selection        int    `help:"number of selection to be simulated" default:"100000"`
	NodeCacheRefresh int    `help:"number of samples after node cache is refreshed (only important for filterbest)." default:"10000"`
	// contains filtered or unexported fields
}

func (*Simulator) Get

func (s *Simulator) Get(uplink storj.NodeID) func(node storj.NodeID) float64

func (*Simulator) ReadNodes

func (s *Simulator) ReadNodes() (nodes []*nodeselection.SelectedNode, err error)

func (*Simulator) ReadPerformanceData

func (s *Simulator) ReadPerformanceData(nodes []*nodeselection.SelectedNode) error

func (*Simulator) Run

func (s *Simulator) Run() error

Jump to

Keyboard shortcuts

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