Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT: Draft for ticket #45

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ import (

// Constants and vars
const version = "0.4.2"
const workersCannelSize = 1024

const workersCannelSize = 1
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the workers dont pickup new work, we dont want to hide the fact that requests are piling up.

const errorBadHTTPCode = "Bad HTTP status code"

var applog *logger.Logger
Expand All @@ -49,7 +50,7 @@ var registry = prometheus.NewRegistry()
// var secondsDurationBuckets = []float64{0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10}

// Objectives for summary distributions
var summaryObjectives = map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.95: 0.005, 0.99: 0.001}
var summaryObjectives = map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.95: 0.005, 0.99: 0.001, 1.0: 0.0}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P100 is interesting because we want to know the worst spikes


// Config is the main app config struct
type appConfig struct {
Expand Down Expand Up @@ -625,6 +626,7 @@ func main() {
flag.DurationVar(&config.fireDuration, "fire-duration", time.Second*10, "Duration of the benchmark. Specify 0 to run forever until stopped")
flag.IntVar(&config.fireRate, "fire-rate", 0, "Desired rate in requests/sec. Default is 0 - unlimited")

// TODO: Set dynamically based on config.sendTimeout * config.fireRate
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically that should mean that requests never ever pile up

flag.IntVar(&config.workers, "workers", 1, "The number of worker threads")
flag.BoolVar(&config.verbose, "verbose", false, "Print INFO level applog to stdout")
flag.BoolVar(&config.insecure, "insecure", false, "Ignore TLS certificate errors")
Expand Down