From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MZNXGnJ+GGAQEAAA0tVLHw (envelope-from ) for ; Mon, 01 Feb 2021 22:19:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id o/u7FXJ+GGAACQAAB5/wlQ (envelope-from ) for ; Mon, 01 Feb 2021 22:19:30 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E912A940250 for ; Mon, 1 Feb 2021 22:19:29 +0000 (UTC) Received: from localhost ([::1]:38502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6hXc-0003LN-VN for larch@yhetil.org; Mon, 01 Feb 2021 17:19:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6hXD-0003J1-0s for guix-patches@gnu.org; Mon, 01 Feb 2021 17:19:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50148) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6hXC-0002SZ-NF for guix-patches@gnu.org; Mon, 01 Feb 2021 17:19:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l6hXC-0004s5-Ix for guix-patches@gnu.org; Mon, 01 Feb 2021 17:19:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45948] [PATCH 0/5] Improvements to the Automake SRFI 64 test driver. In-Reply-To: <20210118061853.26808-1-maxim.cournoyer@gmail.com> Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 01 Feb 2021 22:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45948 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Received: via spool by 45948-done@debbugs.gnu.org id=D45948.161221791918684 (code D ref 45948); Mon, 01 Feb 2021 22:19:02 +0000 Received: (at 45948-done) by debbugs.gnu.org; 1 Feb 2021 22:18:39 +0000 Received: from localhost ([127.0.0.1]:33460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6hWn-0004rG-Rh for submit@debbugs.gnu.org; Mon, 01 Feb 2021 17:18:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6hWk-0004r0-H3 for 45948-done@debbugs.gnu.org; Mon, 01 Feb 2021 17:18:37 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34520) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6hWf-0002DA-21; Mon, 01 Feb 2021 17:18:29 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52238 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l6hWe-0007nM-LR; Mon, 01 Feb 2021 17:18:28 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20210118062501.27022-1-maxim.cournoyer@gmail.com> <20210118062501.27022-5-maxim.cournoyer@gmail.com> <87eei2p0qu.fsf_-_@gnu.org> <87lfc8sb8w.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 13 =?UTF-8?Q?Pluvi=C3=B4se?= an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 01 Feb 2021 23:18:27 +0100 Message-ID: <87czxjh1os.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45948-done@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.86 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E912A940250 X-Spam-Score: -2.86 X-Migadu-Scanner: scn1.migadu.com X-TUID: p4mJ3+JUKJEf Hello! Maxim Cournoyer skribis: > Ludovic Court=C3=A8s writes: > > [...] > >> I never felt the need for this since most individual files run quickly >> enough (and those that don=E2=80=99t should be optimized=E2=80=A6), but = it can be >> useful. > > What triggered it for me was trying to iterate using tests added to the > tests/packages.scm test module: [...] > 1.6 s; better than 46 s! Quite a difference, indeed! Some tests, like =E2=80=98tests/store.scm=E2=80=99, invoke the GC (via =E2= =80=98delete-paths=E2=80=99 calls in particular), and this is a bad idea because it takes ages. What I meant by =E2=80=9Cshould be optimized=E2=80=9D is that these tests s= hould be tweaked to avoid invoking the GC as much as possible. That=E2=80=99s not the case of =E2=80=98tests/packages.scm=E2=80=99 though.= Which gives me an idea: what would it take to modify the test driver so it can print the time spent in each test? :-) That would probably prove helpful to optimize core Guix. In many cases, I also run the one test I=E2=80=99m interested in through Ge= iser, which gives an optimally fast feedback loop. > We can also check the time the suspected slow test took: > > $ time make check TESTS=3Dtests/packages.scm SCM_LOG_DRIVER_FLAGS=3D"--se= lect=3D'fold-available-packages with/without cache'" > [...] > PASS: tests/packages.scm - fold-available-packages with/without cache Ah ha! Turns out a large part of the time was due to the O(n=C2=B2) behavi= or of the various list operations (the list of packages is big enough!). Fixed in 73744725dd0a65cddaa9251f104f17ca27756479. >>> +The underlying SRFI 64 custom Automake test driver used for the 'check' >>> +test suite (located at @file{build-aux/test-driver.scm}) also allows >> >> Maybe shorten to =E2=80=9CThe underlying test driver (located at >> @file{build-aux/test-driver.scm}) also allows=E2=80=9D. > > I see value in explicitly stating what it is, as it took me some effort > to be able to answer that question when I started looking at it (the > test driver). Agreed. It just seemed to me that we were mentioning three new concepts/tools in passing: SRFI-64, Automake, and test drivers. > I've now pushed this series to master; thank you for the review! Thank you! Ludo=E2=80=99.