[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Patch to add memory size benchmarking to benchmark
From: |
Nathaniel Smith |
Subject: |
Re: [Monotone-devel] Patch to add memory size benchmarking to benchmark suite |
Date: |
Sat, 8 Jul 2006 23:21:33 -0700 |
User-agent: |
Mutt/1.5.11+cvs20060403 |
On Fri, Jul 07, 2006 at 05:53:13PM -0700, Eric Anderson wrote:
> Attached is a patch that adds in a new memtime.c executable
> that will "time" both the memory and CPU usage of a command, and the
> update that integrates that into the new benchmark.py script. It should
> apply to 35534b3bb56f6472a23a3c99fce5aeb4e004431c of
> net.venge.monotone.contrib.benchmark
This is great :-).
> One piece needs to be fixed, but I don't have the python expertise to
> do so. I couldn't figure out how to get the path to memtime into the
> object so that it could be specified on the command line. I suspect
> for anyone that knows python this will be a 10 second exercise, but
> after 5-10 minutes of trying things I gave up.
Right, this is a stupid thing about the framework ATM. I'll fix it...
> 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?
The rest looks good, and I've applied it.
-- Nathaniel
--
Eternity is very long, especially towards the end.
-- Woody Allen