Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrGrantDenied = errors.New("server denied us grant")
ErrGrantDenied is used when GM denied us new grant (server is drained), hence we can't proceed with the test
Functions ¶
func ProcessMonitoringResults ¶
func ProcessMonitoringResults(prefix string, results map[string]TestResult, s stats.Server)
ProcessMonitoringResults returns map of metrics based on TestResults
Types ¶
type PTP4lTestConfig ¶
PTP4lTestConfig is a configuration for Tester
func (*PTP4lTestConfig) Target ¶
func (p *PTP4lTestConfig) Target(server string)
Target sets the server to test
type PTP4lTestResult ¶
type PTP4lTestResult struct { Server string RXTimestamp time.Time TXTimestamp time.Time Error error }
PTP4lTestResult is what we get after the test run
func (PTP4lTestResult) Delta ¶
func (tr PTP4lTestResult) Delta() time.Duration
Delta is a difference between receiver's RX timestamp and our TX timestamp
func (PTP4lTestResult) Err ¶
func (tr PTP4lTestResult) Err() error
Err returns an error value of the PTP4lTestResult
func (PTP4lTestResult) Explain ¶
func (tr PTP4lTestResult) Explain() string
Explain provides plain text explanation of linearizability test result
func (PTP4lTestResult) Good ¶
func (tr PTP4lTestResult) Good() (bool, error)
Good check if the test passed
func (PTP4lTestResult) Target ¶
func (tr PTP4lTestResult) Target() string
Target returns value of server
type PTP4lTester ¶
type PTP4lTester struct {
// contains filtered or unexported fields
}
PTP4lTester is basically a half of PTP unicast client
func NewPTP4lTester ¶
func NewPTP4lTester(server string, iface string) (*PTP4lTester, error)
NewPTP4lTester initializes a Tester
func (*PTP4lTester) RunTest ¶
func (lt *PTP4lTester) RunTest(ctx context.Context) TestResult
RunTest performs one Tester run and will exit on completion. The result of the test will be returned, including any error arising during the test.
type SPTPTestConfig ¶
type SPTPTestConfig struct { Server string LinearizabilityTestMaxGMOffset time.Duration // contains filtered or unexported fields }
SPTPTestConfig is a configuration for Tester
func (*SPTPTestConfig) Target ¶
func (p *SPTPTestConfig) Target(server string)
Target sets the server to test
type SPTPTestResult ¶
type SPTPTestResult struct { Config SPTPTestConfig Offset float64 Error error ClockClass ptp.ClockClass }
SPTPTestResult is what we get after the test run
func (SPTPTestResult) Err ¶
func (tr SPTPTestResult) Err() error
Err returns an error value of the PTP4lTestResult
func (SPTPTestResult) Explain ¶
func (tr SPTPTestResult) Explain() string
Explain provides plain text explanation of linearizability test result
func (SPTPTestResult) Good ¶
func (tr SPTPTestResult) Good() (bool, error)
Good check if the test passed
func (SPTPTestResult) Target ¶
func (tr SPTPTestResult) Target() string
Target returns value of server
type SPTPTester ¶
type SPTPTester struct {
// contains filtered or unexported fields
}
SPTPTester is basically a half of PTP unicast client
func NewSPTPTester ¶
func NewSPTPTester(server string, sptpurl string, linearizabilityTestMaxGMOffset time.Duration) (*SPTPTester, error)
NewSPTPTester initializes a Tester
func (*SPTPTester) RunTest ¶
func (lt *SPTPTester) RunTest(_ context.Context) TestResult
RunTest performs one Tester run and will exit on completion. The result of the test will be returned, including any error arising during the test. Warning: the listener must be started via RunListener before calling this function.
type TestResult ¶
TestResult is what we get after the test run
type Tester ¶
type Tester interface {
RunTest(ctx context.Context) TestResult
}
Tester is basically a half of PTP unicast client