I am testing out concurrency in Go by writing a client (in the form of a web server) that makes many requests to a web server and then returns how long it took to make those requests. Basically a benchmark tool.
Here is to code I am using currently: main.go
I know my code has many flaws but the one I am concerned with at the moment is how much effort it takes test how performance would change if I add more go routine calls. In the CallSync function I have to keep adding on to this massive select statement and to the massive list of calls to the func that starts the go routine. I know there must be a better way. I probably don't even need to synchronize like I am right now, but if I did how could I do this in a more flexible way? I want to have code where I can specify the number of "go routines" to call and it will call that the routine that number of times and synchronize with all the associated channels without having to hard code it all.