Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 30148 invoked from network); 19 Sep 2007 07:40:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Sep 2007 07:40:47 -0000 Received: (qmail 2410 invoked by uid 500); 19 Sep 2007 07:40:38 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 2207 invoked by uid 500); 19 Sep 2007 07:40:38 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 2196 invoked by uid 99); 19 Sep 2007 07:40:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2007 00:40:38 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of elecharny@gmail.com designates 66.249.82.229 as permitted sender) Received: from [66.249.82.229] (HELO wx-out-0506.google.com) (66.249.82.229) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2007 07:40:37 +0000 Received: by wx-out-0506.google.com with SMTP id s8so85075wxc for ; Wed, 19 Sep 2007 00:40:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=cvnSNcRFNL7HpwviiUQ5RkjF1jMUKXti+G8Yo6ealNU=; b=Rr/xBm7DJSk+Yq2QxGs2v0u6Y3uaNF1wuEUaRDwxztUNEyoUXxBnSca5jxvdw90ISiicFqmoMYlo8+sqLR4+JN3rlbC9TTtp/97YFs6rdotChA9O2YaaXOKrefj5mtkJgM1gZkh9xxMSbHQGGnD1VH2sYhPBkyNnfOTF6+i6HA4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nuzmTO2afaZv+Ic+xMsfimX/1C34BbNuCYY1Y/nvMEPfo9w3Yw+pnaEU4SitB8PO+YhMBVW3Mns3JhQI/nl5mJAtcBB4jDqi9DOESSWoxOdjO0aLQAr7605Gy0UYSiX9fKMy7sKrPScryYqhuI36SgQs5thqdAPw6B1hzhSA6JM= Received: by 10.90.90.3 with SMTP id n3mr366848agb.1190187616684; Wed, 19 Sep 2007 00:40:16 -0700 (PDT) Received: by 10.90.31.7 with HTTP; Wed, 19 Sep 2007 00:40:16 -0700 (PDT) Message-ID: Date: Wed, 19 Sep 2007 09:40:16 +0200 From: "Emmanuel Lecharny" Reply-To: elecharny@iktek.com To: "Apache Directory Developers List" Subject: Fwd: Speeding up tests In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org Oops, forget to send tis mail _with the content_ to the ML ;) ---------- Forwarded message ---------- From: Emmanuel Lecharny Date: Sep 19, 2007 2:13 AM Subject: Re: Speeding up tests To: Alex Karasulu Hi Alex, some comment in the body : > Been thinking about this for some time as you know. At first I just made= me > a ram drive on linux to deal with this :D - it saved like 50% of the time > but yeah that's laughable (both the technique and the time saved). But t= his > was just a quick remedy. Still 7 minutes is too long to run integration > tests. The bulk of the cost of integration tests comes from bootstrappin= g > specifically off the top of my head I'd list the following top time sucke= rs: > > o partition creation (with various db files) > o schema partition > o system partition > o schema loading and checks > > I suspect you can do thousands of adds, deletes and modifies for the cost= of > bootstrapping. Exactly. The schema loading is damn costly (more than 600 entries to read) So my recommendation is to find a way to snapshot the state > of the server then roll it back with anti-requests. This really is not a= s > complex as it sounds. We have the capability to do this easily using an > interceptor much like the changelog interceptor in my embedding workshop > which Ersin knocked out a while back. Perhaps for each log operation > tracked by this interceptor we can have a configuration switch to track t= he > anti-ldif. This would not be too hard to do. > > Add =3D> Delete > Delete =3D> Add > Modify (Replace) =3D> Modify (Replace) > Modify (Remove) =3D> Modify (Add) > Modify (Add) =3D> Modify (Remove) > ModifyDn =3D> ModifyDN > > The order would be reversed. So if you have this train of requests { R1, > R2, R3, R4, R5 } that correspond to the following LDIF sequence { L1, L2, > L3, L4, L5 } then you just need the following anti operations { A5, A4, A= 3. > A2, A1 }. Another way to have done this nicely is if we had transactions > enabled properly. We could just rolllback :). But this is a quick > workaround to the problem. There is more than that. This bring up some very interesting features : (1) test speed boost (minimal value) (2) recording and playback for complex test cases (3) for snapshoting and rolling back the server to previous states (4) for creating journals to be used if the server crash Let's discuss that in a separate thread. Thanks Alex > > Alex > > > -- Regards, Cordialement, Emmanuel L=E9charny www.iktek.com --=20 Regards, Cordialement, Emmanuel L=E9charny www.iktek.com