[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [RFC] Stop sleeping for timestamps when running tests

From: Peter Lundblad <plundblad_at_google.com>
Date: 2007-03-12 10:09:05 CET

Ivan Zhakov writes:
> - I propose to make semantic of variable similar as SVN_ASP_DOT_NET_HACK.
> I.e. make variable SVN_NO_SLEEP_FOR_TIMESTAMPS and doesn't care
> about it's contents.
>
>

Erik,

You're talking about running tests, but your patch unconditinally checks for
this variable.

- When sending out an RFC, it is often good to wait a few days to collect
  feedback. Why rush with this patch?

- You're adding this functionality to a (more or less) general-purpose
  A:I, but the documentation says nothing about that.

- The implementation makes this available in all builds.
  "Don't tell anyone about it, but there's an undocumented hack that makes
  your client slightly faster." Is this something we want to support?

- This makes us not run the code people use when we run our tests.
  I know the slow test suite is annoying, but I'm against circumventing the
  sleep when running most tests by default.

Thanks,
//Peter

> On 3/11/07, Erik Huelsmann <ehuels@gmail.com> wrote:
> > In the last few days, I committed an extra criterion to help determine
> > 'changedness' of a file: libsvn_wc also considers the size of the file
> > at hand. So, now we do not only depend on the timestamp any more. If a
> > file changes in size (but not in time), svn will detect it's possibly
> > changed.
> >
> > In our test-suite all but 2 tests change the sizes of the files
> > involved in the test. That means that all (except these 2) tests don't
> > have to depend on the timestamp to complete successfully.
> >
> > I added (locally) a test to svn_sleep_for_timestamps() to check an
> > environment variable whether or not to sleep for stamps. When running
> > the test suite with that variable set to the right value,
> > basic_tests.py took 24seconds.
> >
> > Recently lgo added parellel (?) execution of tests. Tests run in
> > parellel also take 24seconds.
> >
> > I'd like to change our test suite to not sleep for timestamps except
> > for a specified number of tests. Currently the specified tests would
> > be the ones which fail without sleeping. That way, we won't need the
> > parellelized feature (lgo prefers to rip that).
> >
> > Additional benefit of not-sleeping versus parellelizing is that the
> > on-disk space-requirements stay the same as they currently are. This
> > could be important for execution on RAM disks.
> >
> >
> > Comments?
> >
> >
> > bye,
> >
> > Erik
> >
> > The patch to libsvn_subr:svn_sleep_for_timestamps():
> >
> > Index: subversion/libsvn_subr/time.c
> > ===================================================================
> > --- subversion/libsvn_subr/time.c (revision 23768)
> > +++ subversion/libsvn_subr/time.c (working copy)
> > @@ -2,7 +2,7 @@
> > * time.c: time/date utilities
> > *
> > * ====================================================================
> > - * Copyright (c) 2000-2004 CollabNet. All rights reserved.
> > + * Copyright (c) 2000-2007 CollabNet. All rights reserved.
> > *
> > * This software is licensed as described in the file COPYING, which
> > * you should have received as part of this distribution. The terms
> > @@ -289,9 +289,13 @@
> > svn_sleep_for_timestamps(void)
> > {
> > apr_time_t now, then;
> > + const char *env_val = getenv("SVN_SLEEP_FOR_TIMESTAMPS");
> >
> > /* Sleep until the next second tick, plus a tenth of a second for margin. */
> > - now = apr_time_now();
> > - then = apr_time_make(apr_time_sec(now) + 1, APR_USEC_PER_SEC / 10);
> > - apr_sleep(then - now);
> > + if (apr_strnatcasecmp(env_val, "no") != 0)
> > + {
> > + now = apr_time_now();
> > + then = apr_time_make(apr_time_sec(now) + 1, APR_USEC_PER_SEC / 10);
> > + apr_sleep(then - now);
> > + }
> > }
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> > For additional commands, e-mail: dev-help@subversion.tigris.org
> >
> >
>
>
> --
> Ivan Zhakov
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 12 10:09:25 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.