monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] net.venge.monotone.experiment.performance


From: Eric Anderson
Subject: Re: [Monotone-devel] net.venge.monotone.experiment.performance
Date: Mon, 7 Aug 2006 01:32:53 -0700

Nathaniel Smith writes:
 > On Sun, Aug 06, 2006 at 06:43:49PM -0700, Eric Anderson wrote:
 > > Nathaniel Smith writes:
 > >  > Well, I _think_ it will work.  You broke SimpleRandomRepo pretty good
 > >  > with your mkrandom changes :-).  I'm not sure if I fixed stuff up
 > >  > right; I've been getting weird errors.
 > > 
 > > What broke in it?  I ran a whole ton of tests on it, and if you didn't
 > > build mkrandom, it should have behaved exactly the same way as before
 > > with the arguments you're showing.
 > 
 > You have to pass the mkrandom path to RandomContentSource now, and
 > while you updated its subclass FileSource and callers, you didn't
 > update its other subclass EditSource and callers...

Doh, didn't notice EditSource existed.  Sorry about that.  Is it worth
having an example benchmark that runs through all of the possible
benchmarks to verify that nothing has been messed up? I thought I'd
tested all the codepaths.

The easiest fix is to change:

class RandomContentSource(object):
    def __init__(self, mkrandom_path):
        self.mkrandom_path = mkrandom_path

to

class RandomContentSource(object):
    def __init__(self, mkrandom_path = None):
        self.mkrandom_path = mkrandom_path

it should fallback properly in that case to the python generator,
although you sacrifice the speed of the binary generator.  Looking at
it a little closer, you'll need to change self.genbytes to
self.gentextbytes also.  Any idea of the right semantics for editing a
binary file?
        -Eric





reply via email to

[Prev in Thread] Current Thread [Next in Thread]