00420b5904
Download is server from two goroutines: * one is waiting for the orders (and updates the actual limit) * other one sends the valuable bytes back to the client (in case the actual order is big enough) These two tasks are syncrhonized with the help of a `sync2.NewThrottle()` But all of these happens in the same method, therefore we have no idea how much time is spent on waiting for next orders (throttle can wait until we receive new orderlimit), and how much time is spent with actual work. This patch moves the actual work (after sending routine is waked up) to a separated method to have better visibility and measure the actual work (read data + send it). Change-Id: Ia5068c544560a53bc2fcea6cb6fce85cfacbd95b |
||
---|---|---|
.. | ||
usedserials | ||
doc.go | ||
endpoint_test.go | ||
endpoint.go | ||
verification_test.go | ||
verification.go |