Documentation ¶
Overview ¶
Package fetch simulates bulk file transfer traffic patterns.
Index ¶
- Variables
- type Counters
- type Cubic
- type Fetcher
- func (fetcher *Fetcher) AddTemplate(tplArgs ...interface{}) (i int, e error)
- func (fetcher *Fetcher) Close() error
- func (fetcher *Fetcher) CountProcs() int
- func (fetcher *Fetcher) CountThreads() int
- func (fetcher *Fetcher) Face() iface.Face
- func (fetcher *Fetcher) Launch()
- func (fetcher *Fetcher) Logic(i int) *Logic
- func (fetcher *Fetcher) Reset()
- func (fetcher *Fetcher) RxQueue(i int) *iface.PktQueue
- func (fetcher *Fetcher) Stop()
- func (fetcher *Fetcher) Thread(i int) ealthread.Thread
- type FetcherConfig
- type Logic
- func (fl *Logic) Close() error
- func (fl *Logic) Cubic() *Cubic
- func (fl *Logic) Finished() bool
- func (fl *Logic) Init(windowCapacity int, socket eal.NumaSocket)
- func (fl *Logic) ReadCounters() (cnt Counters)
- func (fl *Logic) Reset()
- func (fl *Logic) RttEst() *RttEst
- func (fl *Logic) RxData(segNum uint64, hasCongMark bool)
- func (fl *Logic) SetFinalSegNum(segNum uint64)
- func (fl *Logic) TriggerRtoSched()
- func (fl *Logic) TxInterest() (need bool, segNum uint64)
- func (fl *Logic) Window() *Window
- type RttEst
- type Window
Constants ¶
This section is empty.
Variables ¶
var ( GqlFetcherNodeType *gqlserver.NodeType GqlFetcherType *graphql.Object GqlTemplateType *graphql.InputObject )
GraphQL types.
Functions ¶
This section is empty.
Types ¶
type Counters ¶
type Counters struct { Time time.Time `json:"time"` LastRtt time.Duration `json:"lastRtt"` SRtt time.Duration `json:"sRtt"` Rto time.Duration `json:"rto"` Cwnd int `json:"cwnd"` NInFlight uint32 `json:"nInFlight"` // number of in-flight Interests NTxRetx uint64 `json:"nTxRetx"` // number of retransmitted Interests NRxData uint64 `json:"nRxData"` // number of Data satisfying pending Interests }
Counters contains counters of Logic.
func (Counters) ComputeGoodput ¶
ComputeGoodput returns average number of Data per second.
type Cubic ¶
Cubic implements the TCP CUBIC congestion avoidance algorithm.
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
Fetcher controls fetch threads and fetch procedures on a face. A fetch procedure retrieves Data under a single name prefix, and has independent congestion control. A fetch thread runs on an lcore, and can serve multiple fetch procedures.
func (*Fetcher) AddTemplate ¶
AddTemplate sets name prefix and other InterestTemplate arguments. Return index of fetch procedure.
func (*Fetcher) CountProcs ¶
CountProcs returns number of fetch procedures.
func (*Fetcher) CountThreads ¶
CountThreads returns number of threads.
func (*Fetcher) Reset ¶
func (fetcher *Fetcher) Reset()
Reset resets all Logics. If the fetcher is running, it is automatically stopped.
type FetcherConfig ¶
type FetcherConfig struct { NThreads int `json:"nThreads,omitempty"` NProcs int `json:"nProcs,omitempty"` RxQueue iface.PktQueueConfig `json:"rxQueue,omitempty"` WindowCapacity int `json:"windowCapacity,omitempty"` }
FetcherConfig contains Fetcher configuration.
type Logic ¶
type Logic C.FetchLogic
Logic implements fetcher congestion control and scheduling logic.
func LogicFromPtr ¶
LogicFromPtr converts *C.FetchLogic to *Logic. ptr must be in C memory due to TAILQ_HEAD usage.
func (*Logic) Init ¶
func (fl *Logic) Init(windowCapacity int, socket eal.NumaSocket)
Init initializes the logic and allocates data structures.
func (*Logic) ReadCounters ¶
ReadCounters retrieves counters.
func (*Logic) SetFinalSegNum ¶
SetFinalSegNum assigns (inclusive) final segment number.
func (*Logic) TriggerRtoSched ¶
func (fl *Logic) TriggerRtoSched()
TriggerRtoSched triggers the internal RTO scheduler.
func (*Logic) TxInterest ¶
TxInterest requests for Interest transmission.