cmpxchg16/gobench

Doesn't stop after -t seconds on windows

Opened this issue · 6 comments

I get a not supported by windows message in the console after the desired timeout. CTRL-c stops it just fine, and the results are also displayed nicely.

The console output:

C:\dev\go\bin> ./gobench -u http://localhost/ -c 1500 -t 15
Dispatching 1500 clients
Waiting for results...
2016/05/26 15:47:42 not supported by windows

go version go1.6.2 windows/amd64

The error message itself could also be clarified. From the message I have no clue what is not supported by windows. Please add that information, e.g. "-t option is not properly supported" or something like that.

The same situation for go 32 windows/32 1.8.1

gobench>gobench.exe -c 1 -t 10 -u http://localhost:8105/about/
Dispatching 1 clients
Waiting for results...
2017/04/19 22:12:38 not supported by windows

After break program by ^C, printed out next result:

Requests: 31 hits
Successful requests: 0 hits
Network failed: 0 hits
Bad requests failed (!2xx): 31 hits
Successful requests rate: 0 hits/sec
Read throughput: 605 bytes/sec
Write throughput: 196 bytes/sec
Test time: 15 sec

I had the same issue when I first downloaded and built. However, I think if you try and run via go run first the issue resolves itself;

go run gobench.go -u http://localhost/ -c 50 -r 10

See if that finishes after 10 seconds and if it does rebuild.

I personally don't think this is a bug with gobench.

Sending os.Interrupt via os.Process.Signal works on most platforms, but it does not work on
Windows. See golang/go#6720

shameless plug: https://github.com/istio/fortio also had issues on windows at first but should now work fine after eliminating trying to send signal to self

for future comers, check #27