Further improvements to the upload experience. See commits inlined below.
cli: upload-pack events and spinners
Introduce a set of types for initialising and updating a set of spinners for upload-pack events. The spinners react to the events that are emitted from the upload-pack process in the worker.
Each set of spinners are for a given remote since the protocol may interact
with multiple remotes at the same time when announcing.
The spinners are lazy when first constructed and are only constructed once an upload-pack event is provided for a given remote.
The events expected for the spinners are: enumerating objects, counting objects, compressing objects, and the throughput of sending the bytes to the receiving end.
node: simplify upload-pack reader joining
The join method is equivalent to the custom loop that was written for joining
the reader thread in upload-pack.
node: reduce default upload-pack timeout
The default upload-pack timeout can be reduced by noticing the fact that if the stdout stream is still sending data, then the reader thread can stay alive.
This is achieved by keeping a timer that gets set everytime the upload-pack writer sends data. If the reader then runs into a timeout, it can check if this timer has elapsed the timeout as well, otherwise it can loop back and read again. This will either lead to waiting long enough that the EOF message is received, or both streams timeout.
From empirical testing, this can result in the timeout being exceeded but the EOF message not being received, if the pack data is large enough that the receiving side takes more time to write it to disk. However, this means that the upload should, in theory, have completed successfully either way.
The --timeout option is also used in the git-upload-pack process for good
measure.
Further improvements to the upload experience. See commits inlined below.
cli: upload-pack events and spinners
Introduce a set of types for initialising and updating a set of spinners for upload-pack events. The spinners react to the events that are emitted from the upload-pack process in the worker.
Each set of spinners are for a given remote since the protocol may interact
with multiple remotes at the same time when announcing.
The spinners are lazy when first constructed and are only constructed once an upload-pack event is provided for a given remote.
The events expected for the spinners are: enumerating objects, counting objects, compressing objects, and the throughput of sending the bytes to the receiving end.
node: simplify upload-pack reader joining
The join method is equivalent to the custom loop that was written for joining
the reader thread in upload-pack.
node: reduce default upload-pack timeout
The default upload-pack timeout can be reduced by noticing the fact that if the stdout stream is still sending data, then the reader thread can stay alive.
This is achieved by keeping a timer that gets set everytime the upload-pack writer sends data. If the reader then runs into a timeout, it can check if this timer has elapsed the timeout as well, otherwise it can loop back and read again. This will either lead to waiting long enough that the EOF message is received, or both streams timeout.
From empirical testing, this can result in the timeout being exceeded but the EOF message not being received, if the pack data is large enough that the receiving side takes more time to write it to disk. However, this means that the upload should, in theory, have completed successfully either way.
The --timeout option is also used in the git-upload-pack process for good
measure.
Changes:
- rebased
- handle errors in the upload pack spinners
Changes:
- rebased
Changes:
- rebased on 55e905613ddf81fb04c69ab6fa6f4fd99622d789
Changes:
- rebased on 3b342ab385810fd3e67ec1fb05f45b27ba50bc36
Changes:
- Remove extra spinners since they didn’t work as the author expected :(
- Simplify the terminal output to display the number of remotes being uploaded to and the transmitted bytes/throughput, as well as when an upload is finished for a peer.
Changes:
- Removed inner timeout semantics between upload-pack threads
Rebase, small fix.