Versions in this module Expand all Collapse all v0 v0.0.26 Jul 15, 2020 v0.0.25 Jul 15, 2020 v0.0.24 Jul 15, 2020 v0.0.23 Jul 15, 2020 Changes in this version + type AtomicBool struct + func (b *AtomicBool) Get() bool + func (b *AtomicBool) Set(value bool) v0.0.22 Jul 15, 2020 v0.0.21 Jul 15, 2020 v0.0.20 Jul 14, 2020 Changes in this version + const DefaultGrafanaPort + const DefaultMetricsInstanceType + const DefaultVMRootUser + const HTTPBodyDelimiter + const MetricsContainerCommand + const ParallelMode + const ReportFileTmpl + const RequestHeader + const RequestHeaderBody + const ResponseHeader + const ResponseHeaderBody + const RoleGenerator + const RoleMetrics + const SequenceMode + const SequenceValidateMode + func BuildSuiteCommand(testDir string, platform string) + func CodegenAttackerFile(packageName string, label string) + func CodegenAttackersFile(packageName string, labels []LabelKV) + func CodegenChecksFile(packageName string, labels []LabelKV) + func CodegenLabelsFile(packageName string, labels []LabelKV) + func CodegenMainFile(packageName string) + func CollectYamlLabels() []string + func CreateOrReplaceFile(fname string) *os.File + func DecodeECDSAPair(pemEncoded string, pemEncodedPub string) (*ecdsa.PrivateKey, *ecdsa.PublicKey) + func DefaultReadCSV(a Attack) []string + func DefaultWriteCSV(a Attack, data []string) + func DescribeInstances(svc *ec2.EC2, input *ec2.DescribeInstancesInput) *ec2.DescribeInstancesOutput + func EncodeECDSAPair(privateKey *ecdsa.PrivateKey, publicKey *ecdsa.PublicKey) (string, string) + func ErrorPercentCheck(r *Runner, percent float64) bool + func GenerateNewTestCommand(testDir string, label string) + func GenerateSingleRunConfig(testDir string, label string) + func HumanReadableTestInterval(from string, to string) + func MaxRPS(array []float64) float64 + func NewAttackerStructName(label string) string + func NewCheckFuncName(label string) string + func NewLabelName(label string) string + func NewLoggingHTTPClient(debug bool, transportTimeout int) *http.Client + func PrintReport(r RunReport) + func PromBooleanQuery(r *Runner) bool + func RandInt() int + func ReadCsvFile(path string) (map[string]ChartLine, error) + func RegisterGauge(name string) metrics.Gauge + func RenderChart(requests map[string]ChartLine, fileName string) error + func ReportScaling(inputCsv, outputPng string) + func Run(factory attackerFactory, checksFactory attackerChecksFactory, ...) + func RunSuiteCommand(cfgPath string) + func StartGraphiteSender(prefix string, flushDuration time.Duration, url string) + func TimerangeUrl(fromEpoch int64, toEpoch int64) + func UploadGrafanaDashboard() + func UploadSuiteCommand(testDir string, remoteRootDir string, keyPath string) + func WithRqId(ctx context.Context, rqId string) context.Context + func WithSessionId(ctx context.Context, sessionId string) context.Context + type AfterRunner interface + AfterRun func(r *RunReport) error + type AfterSuite func(config *GeneratorConfig) error + type Annotations struct + List []interface{} + type Attack interface + Clone func(r *Runner) Attack + Do func(ctx context.Context) DoResult + Setup func(c RunnerConfig) error + Teardown func() error + type AttackerWithLabel struct + Label string + Name string + type BeforeRunner interface + BeforeRun func(c RunnerConfig) error + type BeforeSuite func(config *GeneratorConfig) error + type CSVData struct + CsvReader *csv.Reader + CsvWriter *csv.Writer + Mu *sync.Mutex + Recycle bool + func NewCSVData(f *os.File, recycle bool) *CSVData + func (m *CSVData) Flush() + func (m *CSVData) Lock() + func (m *CSVData) Read() ([]string, error) + func (m *CSVData) RecycleData() error + func (m *CSVData) Unlock() + func (m *CSVData) Write(rec []string) error + type CSVMonitored struct + func WithCSVMonitor(a Attack) CSVMonitored + func (m CSVMonitored) Clone(r *Runner) Attack + func (m CSVMonitored) Do(ctx context.Context) DoResult + func (m CSVMonitored) Setup(c RunnerConfig) error + type ChartLine struct + XValues []float64 + YValues []float64 + type Checks struct + Interval int + Query string + Threshold float64 + Type string + type ClusterSpec struct + Instances []InstanceSpec + Region string + func CreateSpec(region string, nodes int, instanceType string) ClusterSpec + type Dashboard struct + Annotations Annotations + Editable bool + GnetID interface{} + GraphTooltip int + HideControls bool + ID interface{} + Inputs Inputs + Links []interface{} + Refresh string + Requires Requires + Rows []Row + SchemaVersion int + Style string + Tags []interface{} + Templating Templating + Time Time + Timepicker TimePicker + Timezone string + Title string + Version int + func DefaultDSDashboard(title string, rows []Row) Dashboard + func GrafanaGeneratorNodeDashboard(title string, labels []string, projectMetricPrefix string) Dashboard + func GrafanaGeneratorsSummaryDashboard(title string, labels []string) Dashboard + type Datable interface + GetData func() (interface{}, error) + PutData func(mo interface{}) error + type DoResult struct + BytesIn int64 + BytesOut int64 + Error error + RequestLabel string + StatusCode int + type DumpTransport struct + func (d *DumpTransport) RoundTrip(h *http.Request) (*http.Response, error) + type GeneratorConfig struct + ExecutionMode string + Generator struct{ ... } + Grafana struct{ ... } + Graphite struct{ ... } + Host struct{ ... } + LoadScriptsDir string + Logging struct{ ... } + Prometheus *Prometheus + Remotes []struct{ ... } + Timezone string + func LoadDefaultGeneratorConfig(cfgPath string) *GeneratorConfig + func (c *GeneratorConfig) Validate() (list []string) + type HostMetrics struct + func NewHostOSMetrics(hostPrefix string, graphiteUrl string, flushDurationSec int, ...) *HostMetrics + func (m *HostMetrics) GetCPU() int64 + func (m *HostMetrics) GetMem() *memory.Stats + func (m *HostMetrics) GetNetwork() (int64, int64) + func (m *HostMetrics) SelectNetworkInterface(stats []network.Stats) *network.Stats + func (m *HostMetrics) Watch(intervalSec int) + type ImportPayload struct + Dashboard Dashboard + Inputs []UploadInput + Overwrite bool + type InfrastructureProviderAWS struct + ClusterSpec ClusterSpec + RunningInstances map[string]*RunningInstance + func NewInfrastructureProviderAWS(spec ClusterSpec) *InfrastructureProviderAWS + func (m *InfrastructureProviderAWS) Bootstrap() + func (m *InfrastructureProviderAWS) Exec(vmName string, cmd string) + type Inputs []struct + type InstanceSpec struct + Image string + Name string + Role string + Type string + type LabelKV struct + Label string + LabelName string + func CollectLabels(path string) []LabelKV + type LatencyMetrics struct + Max time.Duration + Mean time.Duration + P50 time.Duration + P95 time.Duration + P99 time.Duration + Total time.Duration + type Legend struct + Avg bool + Current bool + Max bool + Min bool + Show bool + Total bool + Values bool + type LoadManager struct + AttackerConfigs map[string]RunnerConfig + CSVLog *csv.Writer + CSVLogMu *sync.Mutex + CsvMu *sync.Mutex + CsvStore map[string]*CSVData + Degradation bool + Failed bool + GeneratorConfig *GeneratorConfig + RPSScalingLog *csv.Writer + ReportDir string + Reports map[string]*RunReport + RootMemberPrivateKey *ecdsa.PrivateKey + RootMemberPublicKey *ecdsa.PublicKey + Steps []RunStep + SuiteConfig *SuiteConfig + ValidationFailed bool + func NewLoadManager(suiteCfg *SuiteConfig, genCfg *GeneratorConfig) *LoadManager + func SuiteFromSteps(factory attackerFactory, checksFactory attackerChecksFactory, cfgPath string, ...) *LoadManager + func (m *LoadManager) CheckDegradation() + func (m *LoadManager) CheckErrors() + func (m *LoadManager) CsvForHandle(name string) *CSVData + func (m *LoadManager) HandleShutdownSignal() + func (m *LoadManager) LastSuccessReportForHandle(handleName string) (*RunReport, error) + func (m *LoadManager) RunSuite() + func (m *LoadManager) SetupHandleStore(handle RunnerConfig) + func (m *LoadManager) Shutdown() + func (m *LoadManager) StoreHandleReports() + func (m *LoadManager) WriteLastSuccess(handleName string, ts int64) + type Logger struct + func NewLogger() *Logger + func (m *Logger) FromCtx(ctx context.Context) *Logger + type Metrics struct + Duration time.Duration + Earliest time.Time + End time.Time + Errors []string + Latencies LatencyMetrics + Latest time.Time + Rate float64 + Requests uint64 + StatusCodes map[string]int + Success float64 + Wait time.Duration + type Monitored struct + func WithMonitor(a Attack) Monitored + func (m Monitored) Clone(r *Runner) Attack + func (m Monitored) Do(ctx context.Context) DoResult + func (m Monitored) Setup(c RunnerConfig) error + type Panel struct + AliasColors struct{} + Bars bool + DashLength int + Dashes bool + Datasource string + Fill int + ID int + Legend Legend + Lines bool + Linewidth int + Links []interface{} + NullPointMode string + Percentage bool + Pointradius int + Points bool + Renderer string + SeriesOverrides []interface{} + SpaceLength int + Span int + Stack bool + SteppedLine bool + Targets []Target + Thresholds []interface{} + TimeFrom interface{} + TimeShift interface{} + Title string + Tooltip Tooltip + Type string + Xaxis Xaxe + Yaxes []Yaxe + func GenerateXTimePanel(title string, targets []Target, xSpan int, yAxisFormat string) Panel + type Prometheus struct + EnvLabel string + Namespace string + URL string + type Requires []struct + type Row struct + Collapse bool + Height int + Panels []Panel + Repeat interface{} + RepeatIteration interface{} + RepeatRowID interface{} + ShowTitle bool + Title string + TitleSize string + func GenerateNodeGeneratorRows(labels []string, projectGeneratorNodePrefix string) []Row + func GenerateRow(title string, panel ...Panel) Row + func GenerateSummaryRows(labels []string) []Row + type RunReport struct + Configuration RunnerConfig + Failed bool + FinishedAt time.Time + Metrics map[string]*Metrics + Output map[string]interface{} + RunError string + StartedAt time.Time + func NewErrorReport(err error, config RunnerConfig) RunReport + type RunStep struct + ExecutionMode string + Name string + Runners []*Runner + type Runnable interface + GetManager func() *LoadManager + GetRunner func() *Runner + type Runner struct + CheckData []Checks + Config RunnerConfig + Errors map[string]metrics.Counter + L *Logger + Manager *LoadManager + MaxRPS float64 + Metrics map[string]*Metrics + PromClient v1.API + RampUpMetrics map[string]*Metrics + RateLog []float64 + ReadCsvName string + RecycleData bool + TestStage int + WriteCsvName string + func NewRunner(name string, lm *LoadManager, a Attack, ch RuntimeCheckFunc, c RunnerConfig) *Runner + func (r *Runner) ReportMaxRPS() + func (r *Runner) Run(wg *sync.WaitGroup, lm *LoadManager) + func (r *Runner) SetValidationParams() + func (r *Runner) SetupHandleStore(m *LoadManager) + func (r *Runner) Shutdown() + type RunnerConfig struct + AttackTimeSec int + DebugSleep int + DoTimeoutSec int + HandleName string + HandleParams map[string]string + IsValidationRun bool + MaxAttackers int + Metadata map[string]string + OutputFilename string + RPS int + RampUpStrategy string + RampUpTimeSec int + ReadFromCsvName string + RecycleData bool + StopIf []Checks + StoreData bool + Validation Validation + Verbose bool + WaitBeforeSec int + WriteToCsvName string + func ConfigFromFile(named string) RunnerConfig + func ConfigFromFlags() RunnerConfig + func (c RunnerConfig) Validate() (list []string) + type RunningInstance struct + Id string + KeyFileName string + Name string + PrivateKeyPem string + PublicDNSName string + PublicIPAddress string + Role string + type RuntimeCheckFunc func(r *Runner) bool + type Step struct + ExecutionMode string + Handles []RunnerConfig + Name string + type SuiteConfig struct + DumpTransport bool + GoroutinesDump bool + HttpTimeout int + RootKeys string + RootRef string + Steps []Step + func LoadSuiteConfig(cfgPath string) *SuiteConfig + type Target struct + RefID string + Target string + func GenerateGoroutinesTotalTarget(labels []string, projectMetricPrefix string) []Target + func GenerateHostMetricTargets(tmpl string, hostPrefix string, scale string, labels []string) []Target + func GenerateNetworkSummary() []Target + func GeneratePercentileTargets(labels []string, projectMetricPrefix string) []Target + func GenerateRPSTargets(labels []string, projectMetricPrefix string) []Target + func GenerateSummaryPercentileTargets(labels []string) []Target + func GenerateSummaryRPSTargets(labels []string) []Target + type Templating struct + List []interface{} + type Time struct + From string + To string + type TimePicker struct + RefreshIntervals []string + TimeOptions []string + type Tooltip struct + Shared bool + Sort int + ValueType string + type UploadInput struct + Name string + PluginID string + Type string + Value string + type Validation struct + AttackTimeSec int + Threshold float64 + type WithData struct + type WithRunner struct + R *Runner + func (a *WithRunner) GetManager() *LoadManager + func (a *WithRunner) GetRunner() *Runner + func (a *WithRunner) Teardown() error + type Xaxe struct + Buckets interface{} + Mode string + Name interface{} + Show bool + Values []interface{} + type Yaxe struct + Format string + Label interface{} + LogBase int + Max interface{} + Min interface{} + Show bool