Documentation
¶
Index ¶
- func FuzzEngineOps(ctx context.Context, e Engine, opsPerSec int, numWorkers int, stats *FuzzStats, ...)
- func FuzzHTTPAPIOps(ctx context.Context, apiBaseURL, namespace string, opsPerSec, numWorkers int, ...)
- func WriteFuzzRunCSV(path string, nsStats map[string]NamespaceStats, mode string, readers int) error
- type ColumnPool
- type Engine
- type FuzzStats
- func (fs *FuzzStats) Inc(namespace, op string)
- func (fs *FuzzStats) IncError(namespace string)
- func (fs *FuzzStats) ObserveLatency(namespace string, dur time.Duration)
- func (fs *FuzzStats) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (fs *FuzzStats) Snapshot() map[string]NamespaceStats
- func (fs *FuzzStats) StartStatsMonitor(ctx context.Context, interval time.Duration)
- type HTTPAPIEngine
- func (h *HTTPAPIEngine) BatchDeleteKV(keys [][]byte) error
- func (h *HTTPAPIEngine) BatchPutKV(keys, values [][]byte) error
- func (h *HTTPAPIEngine) DeleteColumnsForRow(rowKey []byte, columnEntries map[string][]byte) error
- func (h *HTTPAPIEngine) DeleteKV(key []byte) error
- func (h *HTTPAPIEngine) GetKV(key []byte) ([]byte, error)
- func (h *HTTPAPIEngine) GetRowColumns(rowKey string, predicate func(columnKey string) bool) (map[string][]byte, error)
- func (h *HTTPAPIEngine) PutColumnsForRow(rowKey []byte, columnEntries map[string][]byte) error
- func (h *HTTPAPIEngine) PutKV(key, value []byte) error
- type KeyPool
- type NamespaceStats
- type ValuePool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FuzzEngineOps ¶
func FuzzEngineOps(ctx context.Context, e Engine, opsPerSec int, numWorkers int, stats *FuzzStats, namespace string, getOPs bool)
FuzzEngineOps concurrently runs fuzzing operations against an Engine using multiple worker goroutines.
func FuzzHTTPAPIOps ¶
func FuzzHTTPAPIOps(ctx context.Context, apiBaseURL, namespace string, opsPerSec, numWorkers int, stats *FuzzStats, includeReads bool)
FuzzHTTPAPIOps runs the fuzzer loop against the HTTP API surface for the namespace.
func WriteFuzzRunCSV ¶
Types ¶
type ColumnPool ¶
type ColumnPool struct {
// contains filtered or unexported fields
}
func NewColumnPool ¶
func NewColumnPool(size int) *ColumnPool
func (*ColumnPool) Mutate ¶
func (cp *ColumnPool) Mutate()
type Engine ¶
type Engine interface {
PutKV(key, value []byte) error
BatchPutKV(keys, values [][]byte) error
DeleteKV(key []byte) error
BatchDeleteKV(keys [][]byte) error
PutColumnsForRow(rowKey []byte, columnEntries map[string][]byte) error
DeleteColumnsForRow(rowKey []byte, columnEntries map[string][]byte) error
GetKV(key []byte) ([]byte, error)
GetRowColumns(rowKey string, predicate func(columnKey string) bool) (map[string][]byte, error)
}
type FuzzStats ¶
type FuzzStats struct {
// contains filtered or unexported fields
}
func NewFuzzStats ¶
func NewFuzzStats() *FuzzStats
func (*FuzzStats) ObserveLatency ¶
func (*FuzzStats) ServeHTTP ¶
func (fs *FuzzStats) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*FuzzStats) Snapshot ¶
func (fs *FuzzStats) Snapshot() map[string]NamespaceStats
type HTTPAPIEngine ¶
type HTTPAPIEngine struct {
// contains filtered or unexported fields
}
HTTPAPIEngine implements the Engine interface on top of the httpapi.Service.
apiBaseURL should point to the service prefix (e.g. http://localhost:8080/api/v1). Each method encodes/decodes payloads so the fuzzer can stress the full HTTP stack.
func NewHTTPAPIEngine ¶
func NewHTTPAPIEngine(ctx context.Context, apiBaseURL, namespace string, client *http.Client) *HTTPAPIEngine
NewHTTPAPIEngine returns an Engine implementation backed by HTTP APIs. The provided client is optional; when nil a default client with a 10s timeout is used.
func (*HTTPAPIEngine) BatchDeleteKV ¶
func (h *HTTPAPIEngine) BatchDeleteKV(keys [][]byte) error
func (*HTTPAPIEngine) BatchPutKV ¶
func (h *HTTPAPIEngine) BatchPutKV(keys, values [][]byte) error
func (*HTTPAPIEngine) DeleteColumnsForRow ¶
func (h *HTTPAPIEngine) DeleteColumnsForRow(rowKey []byte, columnEntries map[string][]byte) error
func (*HTTPAPIEngine) DeleteKV ¶
func (h *HTTPAPIEngine) DeleteKV(key []byte) error
func (*HTTPAPIEngine) GetRowColumns ¶
func (*HTTPAPIEngine) PutColumnsForRow ¶
func (h *HTTPAPIEngine) PutColumnsForRow(rowKey []byte, columnEntries map[string][]byte) error
func (*HTTPAPIEngine) PutKV ¶
func (h *HTTPAPIEngine) PutKV(key, value []byte) error
type NamespaceStats ¶
Click to show internal directories.
Click to hide internal directories.