Documentation ¶
Index ¶
- func HttpBench(sc *SyncConfig, reqDelay time.Duration, ...)
- type SyncConcurrent
- type SyncConfig
- func (sc *SyncConfig) Duration() <-chan time.Time
- func (sc *SyncConfig) IsDurationSet() bool
- func (sc *SyncConfig) MaxReqReached() bool
- func (sc *SyncConfig) ReqCounter() uint64
- func (sc *SyncConfig) SetReqDelay(reqDelay time.Duration)
- func (sc *SyncConfig) SetSyncedConcurrent(syncedCount uint64)
- func (sc *SyncConfig) WaitAll()
- func (sc *SyncConfig) WaitReqDelay()
- type TraceResult
- type TraceResultError
- type TraceSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SyncConcurrent ¶
type SyncConcurrent struct {
// contains filtered or unexported fields
}
func NewSyncConcurrent ¶
func NewSyncConcurrent() *SyncConcurrent
func (*SyncConcurrent) MaxConcurrent ¶
func (syncC *SyncConcurrent) MaxConcurrent() uint64
func (*SyncConcurrent) NewSyncConfig ¶
func (syncC *SyncConcurrent) NewSyncConfig(hook syncedtrace.TraceHookType, concurrencyLimit uint64, duration time.Duration, waitReq bool, result chan *TraceResult) *SyncConfig
func (*SyncConcurrent) ReqCounter ¶
func (syncC *SyncConcurrent) ReqCounter() uint64
func (*SyncConcurrent) WaitAll ¶
func (syncC *SyncConcurrent) WaitAll()
type SyncConfig ¶
type SyncConfig struct { Concurrency *concurrency.Manager // contains filtered or unexported fields }
func NewSyncConfig ¶
func NewSyncConfig(hook syncedtrace.TraceHookType, concurrencyLimit uint64, duration time.Duration, waitReq bool, result chan *TraceResult) *SyncConfig
concurrencyLimit == 0 for unlimited concurrency Duration == 0 for one time loop
func (*SyncConfig) Duration ¶
func (sc *SyncConfig) Duration() <-chan time.Time
func (*SyncConfig) IsDurationSet ¶
func (sc *SyncConfig) IsDurationSet() bool
func (*SyncConfig) MaxReqReached ¶
func (sc *SyncConfig) MaxReqReached() bool
func (*SyncConfig) ReqCounter ¶
func (sc *SyncConfig) ReqCounter() uint64
func (*SyncConfig) SetReqDelay ¶
func (sc *SyncConfig) SetReqDelay(reqDelay time.Duration)
func (*SyncConfig) SetSyncedConcurrent ¶
func (sc *SyncConfig) SetSyncedConcurrent(syncedCount uint64)
func (*SyncConfig) WaitAll ¶
func (sc *SyncConfig) WaitAll()
func (*SyncConfig) WaitReqDelay ¶
func (sc *SyncConfig) WaitReqDelay()
type TraceResult ¶
type TraceResult struct { *syncedtrace.Trace `json:"trace_hooks" yaml:"trace_hooks"` Summary *TraceSummary `json:"trace_summary" yaml:"trace_summary"` Response *http.Response `json:"-" yaml:"-"` Body string `json:"response_body,string" yaml:"response_body,flow"` Err *TraceResultError `json:"error" yaml:"error"` }
func NewTraceResult ¶
func NewTraceResult(traceHooks *syncedtrace.Trace, resp *http.Response) *TraceResult
func (*TraceResult) ReadBody ¶
func (tr *TraceResult) ReadBody()
func (*TraceResult) TraceSummary ¶
func (tr *TraceResult) TraceSummary()
type TraceResultError ¶
type TraceResultError struct {
Message string
}
func NewTraceResultError ¶
func NewTraceResultError(err error) *TraceResultError
func (*TraceResultError) Error ¶
func (traceResultError *TraceResultError) Error() string
Click to show internal directories.
Click to hide internal directories.