[darcs-devel] Annoucing darcs_speed_test.pl

Mark Stosberg mark at summersault.com
Sun Mar 20 13:50:05 PST 2005


Hello,

I now have the beginnings of a darcs performance testing tool. 

You can 'darcs get' it from there:

http://mark.stosberg.com/darcs_hive/darcs_speed_test/

You run it like this:

perl darcs_speed_test.pl ./a_test_repo ../darcs-1.0 ../darcs-current

So, the first argument is a repo name, and the rest are darcs binaries. 

There is some more documentation in the script, which you can see with:

 perldoc darcs_speed_test.pl

If you look at the source, I think it will be somewhat clear how to add
more tests, especially if you know Perl.

Some example output is below. The 'wallclock' number is the interesting
one. 

I'm not totally happy with this solution. I won't be offended if you
want to rework some or all of it, or just start over. :)

###

$ ./darcs_speed_test.pl ./test_repo/ ../binaries/darcs-1.0.0 ../darcs-unstable/darcs
-------------------------------------------------------------------------
Running test: local pull with long shared history and no changes
a1Benchmark: timing 5 iterations of /../binaries/darcs-1.0.0, /../darcs-unstable/darcs...
/../binaries/darcs-1.0.0:  6 wallclock secs ( 0.00 usr  0.00 sys +  2.13 cusr  0.12 csys =  2.25 CPU)
/../darcs-unstable/darcs:  6 wallclock secs ( 0.00 usr  0.00 sys +  2.13 cusr  0.13 csys =  2.27 CPU)
-------------------------------------------------------------------------
Running test: diff file.txt
Benchmark: timing 1 iterations of /../binaries/darcs-1.0.0, /../darcs-unstable/darcs...
/../binaries/darcs-1.0.0: 10 wallclock secs ( 0.00 usr  0.00 sys +  0.44 cusr  0.43 csys =  0.87 CPU)
            (warning: too few iterations for a reliable count)
/../darcs-unstable/darcs:  0 wallclock secs ( 0.00 usr  0.00 sys +  0.15 cusr  0.07 csys =  0.22 CPU)
            (warning: too few iterations for a reliable count)
-------------------------------------------------------------------------
Running test: whatsnew -ls
Benchmark: timing 5 iterations of /../binaries/darcs-1.0.0, /../darcs-unstable/darcs...
/../binaries/darcs-1.0.0: 13 wallclock secs ( 0.01 usr  0.00 sys +  1.89 cusr  1.64 csys =  3.54 CPU) @ 640.00/s (n=5)
/../darcs-unstable/darcs:  5 wallclock secs ( 0.00 usr  0.00 sys +  1.84 cusr  1.73 csys =  3.58 CPU)

###

Notice that the Benchmark tool complains that we only ran 'darcs diff'
once per binary, even though it was in fact sufficient for our
purposes-- 0 seconds versus 10 seconds is a clear difference!

I'm using a copy of the darcs repo for my tests. In theory it should
leave the repo it's testing in unharmed, but I made a copy just in case.  :)

    Mark






More information about the darcs-devel mailing list