Documentation ¶
Overview ¶
Package vdetesting provides the framework for testing
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BandwidthTest ¶
type BandwidthTest struct {
// contains filtered or unexported fields
}
BandwidthTest is a Test that check the bandwidth of a connection
func NewBandwidthTest ¶
func NewBandwidthTest(kind string, iface string, address string, port int, pid int) (*BandwidthTest, error)
NewBandwidthTest Return a new BandwidthTest
func (*BandwidthTest) AddStat ¶
func (t *BandwidthTest) AddStat(stat Stat)
AddStat Add a new Statistic
func (*BandwidthTest) Address ¶
func (t *BandwidthTest) Address() net.Addr
Address return the IP address of the test
func (*BandwidthTest) IFace ¶
func (t *BandwidthTest) IFace() *net.Interface
IFace Return the Interface
func (*BandwidthTest) Name ¶
func (t *BandwidthTest) Name() string
Name return the name of this test
func (*BandwidthTest) Port ¶
func (t *BandwidthTest) Port() Port
Port return the port this test will be performed on
func (*BandwidthTest) StartClient ¶
func (t *BandwidthTest) StartClient()
StartClient start the TestClient side of this Test
func (*BandwidthTest) StartServer ¶
func (t *BandwidthTest) StartServer()
StartServer start the server side of Bandwidthtest
type LatencyTest ¶
type LatencyTest struct {
// contains filtered or unexported fields
}
LatencyTest is a server side only Test that use ping to test latency
func NewLatencyTest ¶
func NewLatencyTest(iface string, address string) (*LatencyTest, error)
NewLatencyTest Return a new LatencyTest
func (*LatencyTest) Address ¶
func (t *LatencyTest) Address() net.Addr
Address return the IP address of the test
func (*LatencyTest) StartServer ¶
func (t *LatencyTest) StartServer()
StartServer use ping to control latency
type Port ¶
type Port struct {
// contains filtered or unexported fields
}
Port is a Network Port that Contains the port number and the methods to use them
type ProfilingStat ¶
type ProfilingStat struct {
// contains filtered or unexported fields
}
ProfilingStat implement Stat And it's used to fetch profiling data from /proc
func NewProfilingStat ¶
func NewProfilingStat(pid int, logfile string) ProfilingStat
NewProfilingStat create new stat for profiling a process using /proc
func (*ProfilingStat) SetWaitGroup ¶
func (stat *ProfilingStat) SetWaitGroup(wg *sync.WaitGroup) error
SetWaitGroup add a wait group to the Stat a wait group is used by the stat manager to correctly close and sync all the stats before returing control to the test return error if there is already a waitgroup setup
func (*ProfilingStat) Stop ¶
func (stat *ProfilingStat) Stop()
Stop send the signal to to the goroutine to stop
type StatManager ¶
type StatManager struct {
// contains filtered or unexported fields
}
StatManager is a struct that should be added to everytest it manage all the Stats inside them
func NewStatManager ¶
func NewStatManager() StatManager
NewStatManager Create a NewStatManager, should be used inside tests
func (*StatManager) Add ¶
func (manager *StatManager) Add(s Stat) error
Add new statistic fetcher to the manager
func (*StatManager) Start ¶
func (manager *StatManager) Start() error
Start start all the statistics
func (*StatManager) Stop ¶
func (manager *StatManager) Stop() error
Stop stop all the statistics and wait for them to finish
type StressTest ¶
type StressTest struct {
// contains filtered or unexported fields
}
StressTest is used for profiling and it's main use is to check how vde works under heavy loads
func NewStressTest ¶
func NewStressTest(kind string, iface string, address string, port int, pid int) (*StressTest, error)
NewStressTest Return a new StressTest
func (*StressTest) Address ¶
func (t *StressTest) Address() net.Addr
Address return the IP address of the test
func (*StressTest) Port ¶
func (t *StressTest) Port() Port
Port return the port this test will be performed on
func (*StressTest) StartClient ¶
func (t *StressTest) StartClient()
StartClient is a composition of sendData
func (*StressTest) StartServer ¶
func (t *StressTest) StartServer()
StartServer lauch a test to see what the vde_switch will do on very intensive traffic
type TCPStat ¶
type TCPStat struct {
// contains filtered or unexported fields
}
TCPStat is a stat implementation for getting tcp statistic
func NewTCPStat ¶
NewTCPStat create new tcp stat
func (*TCPStat) SetWaitGroup ¶
SetWaitGroup add a wait group to the Stat a wait group is used by the stat manager to correctly close and sync all the stats before returing control to the test return error if there is already a waitgroup setup
type Test ¶
type Test interface { StartClient() TestServer }
Test is a generic test it need a client method and a server method and it test one single aspect and save the results to a single logfile
type TestRunner ¶
type TestRunner struct {
// contains filtered or unexported fields
}
TestRunner manage the sequence of tests to run and start and stop them
func (*TestRunner) AddTest ¶
func (runner *TestRunner) AddTest(test Test)
AddTest add a test to the quee
func (*TestRunner) StartClient ¶
func (runner *TestRunner) StartClient()
StartClient start in sequence all the quequed server side Tests
func (*TestRunner) StartServer ¶
func (runner *TestRunner) StartServer()
StartServer start in sequence all the quequed server side Tests