Skip to content

Conversation

@haski
Copy link
Contributor

@haski haski commented Jun 21, 2020

move from parameterless function to an interface with a single method receiving an index to allow using a state when sending a request.

)

type RequestFunc func() error
type RequestHandler interface {
Copy link
Contributor

Choose a reason for hiding this comment

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

No docs for exported types

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

wrk3.go Outdated
return reqFunc(localIndex)
}

var flagsDefined = false
Copy link
Contributor

Choose a reason for hiding this comment

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

These shouldn't be global, and I think it was already handled in the command parsing. What happened here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

if ok {
res.counter++
err := e.benchmark.SendRequest()
err := e.benchmark.SendRequest.ExecuteRequest(res.counter)
Copy link
Contributor

Choose a reason for hiding this comment

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

Basically this means all go routines cycle through the same clients at roughly the same times (and if the index is used for requests, for that as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

roughly is not the same and in any way so what ? the whole point here is to allow concurrent requests to the server.
the index is just an indication of progress, not even a global one and the way that I use it in the test allow me to distribute over the connections. in my book it is good enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants