On Tue, Feb 23, 2010 at 02:34:55PM +0000, Eric Kow wrote: > On Tue, Feb 23, 2010 at 09:03:08 -0500, Nathan Gray wrote: > > I tried to add a benchmark for 'darcs add', but so far have been > > unsuccessful. I can send my attempt if someone wants to (gently) > > mentor me in haskell. > > Sure! Why don't you darcs send a patch?
I obliterated the patch when I upgraded darcs-benchmark today. However, I kept a diff of the patch. I do not remember exactly what was wrong with it. At one point it was complaining that 'f' was out of scope, or some such. It also complained about not being able to write the file, but I really do not know what the error was. I would patch it back in, but the new way of setting up the tests is different, so I have to rework the whole thing before it would work anyway. If you could look over the diff and give some pointers, that would be great. I hope it is close to correct. I guessed about some things though, and my guesses must not have been correct. -kolibrie
Fri Feb 19 16:38:26 EST 2010 [email protected] * Add darcs add benchmark diff -rN -u old-darcs-benchmark/Standard.hs new-darcs-benchmark/Standard.hs --- old-darcs-benchmark/Standard.hs 2010-02-23 09:11:29.000000000 -0500 +++ new-darcs-benchmark/Standard.hs 2010-02-23 09:11:29.000000000 -0500 @@ -71,6 +71,16 @@ forM [1..n] $ \_ -> darcs_wh [ "--look-for-adds" ] darcs tr return () +add_mod :: Int -> BenchmarkCmd () +add_mod n darcs tr = do + cd "repo" + forM [1..n] $ \x -> do + forM files $ \f -> liftIO (appendFile f (show n)) + darcs [ "add", show f] + darcs [ "remove", "--all", show f] + return () + where files = [ "83d4a457-60fb-4a78-9b56-0328a6c6f6f7" ] + -- | n patches for each file record_mod :: Int -> BenchmarkCmd () record_mod n darcs _ = do
signature.asc
Description: Digital signature
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
