Documentation ¶
Index ¶
- Constants
- Variables
- type Benchmark_callback_id
- type DB_benchmark
- func (s *DB_benchmark) DeleteCascade(stmt SQLStmt) error
- func (s *DB_benchmark) GetFkNullable() sql.NullInt64
- func (s *DB_benchmark) GetHashFromLoadedJson() string
- func (s *DB_benchmark) Insert(stmt SQLStmt) error
- func (s *DB_benchmark) LinkCallback(path string) (err error)
- func (s *DB_benchmark) Sync(stmt SQLStmt) error
- func (s *DB_benchmark) Validate() error
- type DB_data_rate_pattern
- func (s *DB_data_rate_pattern) GetDescription() sql.NullString
- func (s *DB_data_rate_pattern) GetEstimatedPlaytime() int
- func (s *DB_data_rate_pattern) GetHash() []byte
- func (s *DB_data_rate_pattern) GetHashStr() string
- func (s *DB_data_rate_pattern) GetName() string
- func (s *DB_data_rate_pattern) GetSQLExistsArgs() []any
- func (s *DB_data_rate_pattern) GetSQLExistsStatement() string
- func (s *DB_data_rate_pattern) GetStats() (min float64, max float64, avg float64)
- func (s *DB_data_rate_pattern) GetTh_link_usage() string
- func (s *DB_data_rate_pattern) GetTh_mq_latency() string
- func (s *DB_data_rate_pattern) GetTh_p95_latency() string
- func (s *DB_data_rate_pattern) GetTh_p999_latency() string
- func (s *DB_data_rate_pattern) GetTh_p99_latency() string
- func (s *DB_data_rate_pattern) Insert(stmt SQLStmt) error
- func (s *DB_data_rate_pattern) IsLooping() bool
- func (drp *DB_data_rate_pattern) Next() (value float64, err error)
- func (drp *DB_data_rate_pattern) ParseDRP(provider drp.DataRatePatternProvider) error
- func (drp *DB_data_rate_pattern) Peek() (value float64)
- func (s *DB_data_rate_pattern) SetLooping(endless bool)
- func (s *DB_data_rate_pattern) SetToDone()
- func (s *DB_data_rate_pattern) Sync(stmt SQLStmt) error
- func (s *DB_data_rate_pattern) Validate() (err error)
- type DB_measure_packet
- type DB_measure_queue
- type DB_network_flow
- type DB_session
- type Login
- type SQLStmt
Constants ¶
const ( BM_CB_PreBenchmark = 1 BM_CB_PreSession = 4 BM_CB_PostSession = 7 BM_CB_PostBenchmark = 9 )
Variables ¶
var DEBUG, INFO, WARN, _ = logging.GetLogger()
Functions ¶
This section is empty.
Types ¶
type Benchmark_callback_id ¶
type Benchmark_callback_id uint8
type DB_benchmark ¶
type DB_benchmark struct { //Name of benchamrk (in json) Name string //=Tag Name Tag string //Serial, from DB Benchmark_id int Sessions []*DB_session PrintToStdOut bool CsvOuptut bool Hash string //Not DB Callback benchmark_callback }
func (*DB_benchmark) DeleteCascade ¶
func (s *DB_benchmark) DeleteCascade(stmt SQLStmt) error
func (*DB_benchmark) GetFkNullable ¶
func (s *DB_benchmark) GetFkNullable() sql.NullInt64
func (*DB_benchmark) GetHashFromLoadedJson ¶
func (s *DB_benchmark) GetHashFromLoadedJson() string
func (*DB_benchmark) Insert ¶
func (s *DB_benchmark) Insert(stmt SQLStmt) error
func (*DB_benchmark) LinkCallback ¶
func (s *DB_benchmark) LinkCallback(path string) (err error)
Links external callbacks for benchmark. should only be used by argparse
func (*DB_benchmark) Sync ¶
func (s *DB_benchmark) Sync(stmt SQLStmt) error
func (*DB_benchmark) Validate ¶
func (s *DB_benchmark) Validate() error
type DB_data_rate_pattern ¶
type DB_data_rate_pattern struct { //Set when loading file // //Pk refrenced in session Id int Freq int Nomeasure bool WarmupTimeMs int32 Intial_minRateKbits float64 Initial_scale float64 // contains filtered or unexported fields }
func NewDB_data_rate_pattern ¶
func NewDB_data_rate_pattern() *DB_data_rate_pattern
Create a new DataBaseObject with some initalized values
func (*DB_data_rate_pattern) GetDescription ¶
func (s *DB_data_rate_pattern) GetDescription() sql.NullString
Return the description of the loaded pattern; most likely empty
The description is any comment in a dpr.csv that is not in the :key=value format
func (*DB_data_rate_pattern) GetEstimatedPlaytime ¶
func (s *DB_data_rate_pattern) GetEstimatedPlaytime() int
Returns the playtime, extrapolated from frequency, samples and warmup
func (*DB_data_rate_pattern) GetHash ¶
func (s *DB_data_rate_pattern) GetHash() []byte
Returns the sha256 byte array of the loaded pattern
func (*DB_data_rate_pattern) GetHashStr ¶
func (s *DB_data_rate_pattern) GetHashStr() string
Returns the sha256 byte array as a hex string of the loaded pattern
func (*DB_data_rate_pattern) GetName ¶
func (s *DB_data_rate_pattern) GetName() string
Return the name of the loaded pattern; most likely filename
func (*DB_data_rate_pattern) GetSQLExistsArgs ¶
func (s *DB_data_rate_pattern) GetSQLExistsArgs() []any
func (*DB_data_rate_pattern) GetSQLExistsStatement ¶
func (s *DB_data_rate_pattern) GetSQLExistsStatement() string
func (*DB_data_rate_pattern) GetStats ¶
func (s *DB_data_rate_pattern) GetStats() (min float64, max float64, avg float64)
Wraps drp.DataRatePattern{}.GetStats()
func (*DB_data_rate_pattern) GetTh_link_usage ¶
func (s *DB_data_rate_pattern) GetTh_link_usage() string
Returns the Thresholdvalue in the format "{a,b}"
func (*DB_data_rate_pattern) GetTh_mq_latency ¶
func (s *DB_data_rate_pattern) GetTh_mq_latency() string
Returns the Thresholdvalue in the format "{a,b}"
func (*DB_data_rate_pattern) GetTh_p95_latency ¶
func (s *DB_data_rate_pattern) GetTh_p95_latency() string
Returns the Thresholdvalue in the format "{a,b}"
func (*DB_data_rate_pattern) GetTh_p999_latency ¶
func (s *DB_data_rate_pattern) GetTh_p999_latency() string
Returns the Thresholdvalue in the format "{a,b}"
func (*DB_data_rate_pattern) GetTh_p99_latency ¶
func (s *DB_data_rate_pattern) GetTh_p99_latency() string
Returns the Thresholdvalue in the format "{a,b}"
func (*DB_data_rate_pattern) Insert ¶
func (s *DB_data_rate_pattern) Insert(stmt SQLStmt) error
func (*DB_data_rate_pattern) IsLooping ¶
func (s *DB_data_rate_pattern) IsLooping() bool
Wraps drp.DataRatePattern{}.Iterator().SetToDone()
func (*DB_data_rate_pattern) Next ¶
func (drp *DB_data_rate_pattern) Next() (value float64, err error)
Next returns the next DataRate in a Pattern and its position. If there are no Items left (and looping is turned off), An error is returned instead
Wraps drp.DataRatePattern{}.Iterator().Next()
func (*DB_data_rate_pattern) ParseDRP ¶
func (drp *DB_data_rate_pattern) ParseDRP(provider drp.DataRatePatternProvider) error
Load a DataRatePattern from the given Provider. Uses the self.Internal_{scale, minRateKbits} as constraints to the provider.
func (*DB_data_rate_pattern) Peek ¶
func (drp *DB_data_rate_pattern) Peek() (value float64)
Next returns the next DataRate in a Pattern and its position. Does not advance the Iterator
Wraps drp.DataRatePattern{}.Iterator().Value()
func (*DB_data_rate_pattern) SetLooping ¶
func (s *DB_data_rate_pattern) SetLooping(endless bool)
Set Looping mode to <endless>
true : looping
false: once
func (*DB_data_rate_pattern) SetToDone ¶
func (s *DB_data_rate_pattern) SetToDone()
Wraps drp.DataRatePattern{}.SetToDone()
func (*DB_data_rate_pattern) Sync ¶
func (s *DB_data_rate_pattern) Sync(stmt SQLStmt) error
func (*DB_data_rate_pattern) Validate ¶
func (s *DB_data_rate_pattern) Validate() (err error)
type DB_measure_packet ¶
type DB_measure_packet struct { //Only for inprogram use! (=netFlowID) Time uint64 PacketSojournTimeMs uint32 LoadKbits uint32 Ecn uint32 Dropped uint32 Fk_flow_id int Capacitykbits uint32 Net_flow_string string Net_flow_prio uint8 }
Implements MassPersistable interface
func (*DB_measure_packet) CsvRecord ¶
func (s *DB_measure_packet) CsvRecord() []string
func (*DB_measure_packet) GetSQLArgs ¶
func (s *DB_measure_packet) GetSQLArgs() []any
func (DB_measure_packet) GetSQLStatement ¶
func (DB_measure_packet) GetSQLStatement() string
func (*DB_measure_packet) PrintLine ¶
func (s *DB_measure_packet) PrintLine() error
type DB_measure_queue ¶
type DB_measure_queue struct { Time uint64 Memoryusagebytes uint32 PacketsInQueue uint16 CapacityKbits uint64 Fk_session_tag_id int }
func (*DB_measure_queue) CsvRecord ¶
func (s *DB_measure_queue) CsvRecord() []string
func (*DB_measure_queue) GetSQLArgs ¶
func (s *DB_measure_queue) GetSQLArgs() []any
func (DB_measure_queue) GetSQLStatement ¶
func (s DB_measure_queue) GetSQLStatement() string
type DB_network_flow ¶
type DB_network_flow struct { //Serial - from DB Flow_id int //Fk, refrences DB_session Session_id int Source_ip string Source_port uint16 Destination_ip string Destination_port uint16 Prio uint8 // contains filtered or unexported fields }
func (*DB_network_flow) Insert ¶
func (s *DB_network_flow) Insert(stmt SQLStmt) error
Executes a stmt to insert it into the DB
func (*DB_network_flow) MeasureIdStr ¶
func (s *DB_network_flow) MeasureIdStr() string
func (*DB_network_flow) Sync ¶
func (s *DB_network_flow) Sync(stmt SQLStmt) error
Eyecutes a or multiple sqlstmt, that will make sure its sinked with db
In this case, it makes sure, that its not yet in db.
type DB_session ¶
type DB_session struct { Session_id int Name string Time uint64 Drp_ID int Dev string Markfree int32 Markfull int32 Queuesizepackets int32 ExtralatencyMs int32 Qosmode uint8 L4sEnablePreMarking bool Nomeasure bool //Non DB SignalDrpStart bool // DB_Relations ParentBenchmark *DB_benchmark ChildDRP *DB_data_rate_pattern }
func (*DB_session) Insert ¶
func (s *DB_session) Insert(stmt SQLStmt) error
Executes a sqlstmt to Insert this session into DB
func (*DB_session) SetParentBenchmark ¶
func (s *DB_session) SetParentBenchmark(bm *DB_benchmark)
Set the Session to belong to a benchmark. This is important for the DB-Insert
func (*DB_session) Validate ¶
func (s *DB_session) Validate() (err error)
func (*DB_session) ValidateUniqueName ¶
func (s *DB_session) ValidateUniqueName(stmt SQLStmt) error
Validate uniquiness of the tagname in the benchmark
type SQLStmt ¶
type SQLStmt interface { Exec(query string, args ...interface{}) (sql.Result, error) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) Prepare(query string) (*sql.Stmt, error) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) Query(query string, args ...interface{}) (*sql.Rows, error) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) QueryRow(query string, args ...interface{}) *sql.Row QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row }