monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] Re: Monotone-devel Digest, Vol 39, Issue 15


From: Eric Anderson
Subject: [Monotone-devel] Re: Monotone-devel Digest, Vol 39, Issue 15
Date: Sun, 9 Jul 2006 16:27:46 -0700

address@hidden writes:
 > From: Nathaniel Smith <address@hidden>
 > Subject: Re: [Monotone-devel] Patch to add memory size benchmarking to
 >      benchmark suite
 > 
 > > instrumenter.py: add in a sleep after starting the sub command to make
 > >   sure that it actually gets going and doesn't immediately fail
 > 
 > This code consisted of:
 > + # wait a little to see if the sub process is going to die quickly
 > +    # due to usage error, or due to already running a server
 > +    time.sleep(1)
 > +    os.kill(-self.popen.pid, 0) 
 > 
 > Is the goal to cause an exception to be thrown if the process exits
 > quickly?  Why would you want that?

I had two usage problems running the benchmarks, the first was that
occasionally, if I ctrl-c'd partway through a run because I decided I
made a mistake, the mtn serve process would still be running.  When
the next bechmark run happened, it would fail to get the server going,
but the client would find a server, run to completion, and only then
report that there were no statistics in the server run.  The sleep(1)
and kill detected the error early on.  There may be better ways.  As I
mentioned in the comment there was also some usage error I ran across
-- the sub process was run with bad arguments, possibly while I was
adding the instrumenter, but I can't remember exactly what the error
was other than the sub process didn't really get started, and so this
check caught that mistake as well.
        -Eric





reply via email to

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