Wild fuzzy handwaving offering of direction follows . . .

You're probably not going to get really accurate times as the SVN client itself doesn't provide that information. You might could use Expect or IPC::Run to open a pty which is reading from your svn co URL process and use Time::HiRes to note duration between when lines for each file are emitted (you'd want to make sure it's on a pty so that its STDOUT hopefully doesn't go into buffered mode). After the checkout is done you'd go back and compute the rate by looking at the final size of the file (but keep in mind that SVN keeps another copy of the current revision's contents stashed locally so there's probably some extra time for the local copying embedded in those values).

If that's not precise enough you might want to look at the swig interface to the underlying SVN API; however I don't know if you wouldn't wind up rewriting most of svn co in order to get things instrumented at the right places to get the numbers in which you're interested. Not to mention the SVN API's kinda hairy at the lower levels . . .

Also something like File::Magic could be of interest in determining what kind of contents files have.

Update: Tweaked second paragraph.

The cake is a lie.
The cake is a lie.
The cake is a lie.


In reply to Re: Perl Data Transfer Rate by Fletch
in thread Perl Data Transfer Rate by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.