-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storagenode/piecestore: better monkit metric for download
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
- Loading branch information
Showing
1 changed file
with
38 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters