[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Feedback on JGit clone file transfer size

On Fri, Feb 24, 2012 at 01:15, Jérôme Blanchard <jayblanc@xxxxxxxxx> wrote:
> Just a simple question to know if it's possible to have a feedback
> about the amout of data transfered (in octet) during a git clone.
> In the git client, performing a git clone gives an output that show
> the objects reveived size and transfer rate but I didn't found a way
> to achieve this with jgit.
> Receiving objects: 100% (24930/24930), 4.82 MiB | 1.68 MiB/s, done.
>
> According to what I saw in the jgit source code, it's only possible to
> set a ProgressMonitor (even if you use the Transport object instead of
> the porcelain API) but this monitor only gives informations about
> tasks and jobs done.
> Is anybody have a way that I didn't found ?

Not really. If you can wrap the network socket/pipe you could insert a
byte counter. But nobody does this. Its basically just a missing
feature in the JGit transport APIs. We need a way to also make
transfer throughput available to a ProgressMonitor, and then let the
lower level network code wrap the InputStream or OutputStream with a
counting stream that updates the throughput as data is read or
written.

Its been on my list of "wish I had time for" projects, but never
gotten to for a long time now.