[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Error during repetative calls to cat

From: Ed Hillmann <edhillmann_at_yahoo.com>
Date: 2005-06-17 05:16:31 CEST

I'm using the Perl bindings to access a SVN
repository. I'm doing performance timings, so I have
a simple loop that goes through for a single file, and
isses the same command multiple times....

sub test_svn_cat {
    my $srcUrl = shift;
    my $srcRevision = shift;
    my $targetPath = shift;
    
    my $err;

    open(OUTPUT_HANDLE, ">$targetPath/svnOutput.txt");
    $err = $ctx->cat(\*OUTPUT_HANDLE, $srcUrl,
$srcRevision);

    if (!close(OUTPUT_HANDLE)) {
        print "Close failed: $!\n";
        return 0;
    }
    return 1;
}

sub test_svn_cat_loop {
    my $srcUrl = shift;
    my $srcRevision = shift;
    my $targetPath = shift;
    my $svnCatFn = \&test_svn_cat;

    print "\nTesting SVN Cat ($ITERATIONS
iterations)\n";
    print "Getting Revision $srcRevision of $srcUrl
...\n";

        
    my $t0 = [gettimeofday];

    my $local_iter = 0;
    while ($local_iter < $ITERATIONS) {
            &$svnCatFn($srcUrl, $srcRevision, $targetPath);
        $local_iter++;
    }
    
    my $t1 = [gettimeofday];
    
    $t0_t1 = tv_interval $t0, $t1;
    
    my $avg = $t0_t1 / $ITERATIONS;
    
    print "Test SVN Cat\n";
    print "------------\n";
    print " # of iters: $ITERATIONS\n";
    print " elapsed time (seconds): $t0_t1\n";
    print " avg: $avg\n";
    
}
test_svn_cat_loop
('file:///ct/acct/ehillman/svnRepos/trunk/conftool/docobj/build.xml',
16009,
'/ct/acct/ehillman/svnPerformance/perl/output');

When the URL being passed into the cat method is an
svn url (for example,
"svn://machineName/trunk/conftool/docobj/build.xml"),
it works fine. My default iteration count is 100.

When I pass it a file URL (for example,
"file:///ct/acct/ehillman/svnRepos/trunk/conftool/docobj/build.xml"),
it fails on the 43rd iteration. So, if my iteration
count is less than that, it works without a problem.
But once it hits that number, I get an error.

It's also complaining when it fails that it can't find
Carp/Heavy.pm, which I don't understand because it's
in its PERL5LIB.

Anyways, has anyone come across this before?

Thanks,
Ed

Send instant messages to your online friends http://au.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jun 17 05:18:25 2005

This is an archived mail posted to the Subversion Users mailing list.