From unknown Fri Aug 22 01:33:51 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#26942 <26942@debbugs.gnu.org> To: bug#26942 <26942@debbugs.gnu.org> Subject: Status: [PATCH] Add Add elapsed time to manual-database hook to output message (was: Performance of the man page database generation) Reply-To: bug#26942 <26942@debbugs.gnu.org> Date: Fri, 22 Aug 2025 08:33:51 +0000 retitle 26942 [PATCH] Add Add elapsed time to manual-database hook to outpu= t message (was: Performance of the man page database generation) reassign 26942 guix-patches submitter 26942 Maxim Cournoyer severity 26942 normal tag 26942 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon May 15 12:24:13 2017 Received: (at submit) by debbugs.gnu.org; 15 May 2017 16:24:13 +0000 Received: from localhost ([127.0.0.1]:46770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAIn7-0001s3-2Q for submit@debbugs.gnu.org; Mon, 15 May 2017 12:24:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAIn5-0001rr-5L for submit@debbugs.gnu.org; Mon, 15 May 2017 12:24:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAImy-0007qJ-JS for submit@debbugs.gnu.org; Mon, 15 May 2017 12:24:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39194) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dAImy-0007qB-F0 for submit@debbugs.gnu.org; Mon, 15 May 2017 12:24:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAImw-0002Ew-Sg for guix-patches@gnu.org; Mon, 15 May 2017 12:24:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAImv-0007oc-FE for guix-patches@gnu.org; Mon, 15 May 2017 12:24:02 -0400 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:34724) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dAImt-0007n7-BD; Mon, 15 May 2017 12:23:59 -0400 Received: by mail-pg0-x242.google.com with SMTP id u187so17515494pgb.1; Mon, 15 May 2017 09:23:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=gevN+Wq+C1JONMshZ0k3c6NpeopSZrIe8ya1JK0GMpE=; b=N4q5lRXtc0zL+qdT4+FH+2vOWoTnJcrB3sU1viS0FJ+KQ6bnVBAwOzUCEQuLsVLvAW UHn5ZabWo5txHwqgo/m3D7NF+CkVSuge2jPs18lH6DMca9zNCYaa2AFu7SOx9v9AxILS tR9l43AQwd9Y0lCbte0UnwkjGQ/G/jzBi35/8VTGWz3sISVU9ztZHepzPQnOFfMiVg5w FL5gUMKNaB7wcL+K6M5hPaDrXcmnezMrplr7D9/suIi9n4+gJdq4PaLSpYITJnn4RcHg 19ZPlNaipzYBg/kalCa+9DbJwgK98/qFtkrFWK1FqYDBVXLP92sqKdkXL2br73S6V7sk xcHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=gevN+Wq+C1JONMshZ0k3c6NpeopSZrIe8ya1JK0GMpE=; b=QUkWpfo0zHxf51Th9Wqm1+LIi1Zgee68L6Y4DOIuyvfpa0VGTURUhXP3nfcX3jeLPF kcrnM1Z5/aWmlYhWffS12cMw4C4Lpf1pRnoMg3FpyvE+Wv+UHfXIWrPwAH1BJgrc7F9a YdrR5MuXd7J6QuYKaWZLJ62Qn1zCyQ8AGRWe3C646/tGQxYEVv9U2keNu/AZtqKhyM6y vCi+/N4LzB4XQ0WKL1juYKB3eYHq56mu2oJ54tzh4t6nBtPB6OGEWy8Gv0Ghq3WsRlOl yNpGVeTvTZdbwjXPnEgz2NfsPFgxKXcKkHAqelZ8xw1NrgNUR/oEywAbdvB2duefyQxl spDw== X-Gm-Message-State: AODbwcBUExKS7M62AT/4WsqzOLkg2xI50F78wHuJD6eP3NNgXJzFQmmy woUprQ+cMGiaFP6h X-Received: by 10.99.67.69 with SMTP id q66mr7210233pga.156.1494865438054; Mon, 15 May 2017 09:23:58 -0700 (PDT) Received: from apteryx ([2601:647:4a02:70e3:c2f8:daff:fe5d:2f2f]) by smtp.gmail.com with ESMTPSA id l3sm21070498pfj.130.2017.05.15.09.23.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 May 2017 09:23:56 -0700 (PDT) From: Maxim Cournoyer To: guix-patches@gnu.org Subject: [PATCH] Add Add elapsed time to manual-database hook to output message (was: Performance of the man page database generation) References: <20170405205638.12336.78854@vcs0.savannah.gnu.org> <20170405205640.15AE6210A4@vcs0.savannah.gnu.org> <86y3v9bicq.fsf@gmail.com> <864lxxghmm.fsf@gmail.com> <87a87ibjq1.fsf@gmail.com> <871ssn4ebg.fsf_-_@gnu.org> <87fug8j704.fsf@gmail.com> <8637c7cv5v.fsf@gmail.com> Date: Mon, 15 May 2017 09:23:55 -0700 In-Reply-To: <8637c7cv5v.fsf@gmail.com> (myglc2@gmail.com's message of "Sun, 14 May 2017 11:31:08 -0400") Message-ID: <87r2zqhyw4.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: Ludovic =?utf-8?Q?Court=C3=A8?= =?utf-8?Q?s?= , myglc2 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --=-=-= Content-Type: text/plain Hi myglc2, I'm sending a patch which implements the following: --8<---------------cut here---------------start------------->8--- guix build --check /gnu/store/yx1hdcvyc3agv7bwbxm7jv7zlm6ibzqr-manual-database.drv [...] Creating manual page database for 62 packages... done in 35.112 s --8<---------------cut here---------------end--------------->8--- The change improves the message output by the manual-database hook with the addition is the closing of the message with a "done in x.xxx s". Thanks to myglc2 for providing a snippet and ideas about how to improve this. Maxim --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-profiles-Add-elapsed-time-to-manual-database-hook-to.patch >From 3ec52305f6a1836b42e34b4dc194c16afb1592a2 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 15 May 2017 09:05:48 -0700 Subject: [PATCH] profiles: Add elapsed time to manual-database hook to output message. * guix/profiles.scm (manual-database): Add elapsed time to manual-database hook to output message. --- guix/profiles.scm | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index eb172ef450..6733f105e3 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -957,6 +957,7 @@ the entries in MANIFEST." #~(begin (use-modules (guix build utils) (srfi srfi-1) + (srfi srfi-19) (srfi srfi-26)) (define entries @@ -1011,16 +1012,23 @@ the entries in MANIFEST." (mkdir-p man-directory) (setenv "MANPATH" (string-join entries ":")) - (format #t "creating manual page database for ~a packages...~%" + (format #t "Creating manual page database for ~a packages... " (length entries)) (force-output) - - (zero? (system* #+(file-append man-db "/bin/mandb") - "--quiet" "--create" - "-C" "man_db.conf")))) + (let* ((start-time (current-time)) + (exit-status (system* #+(file-append man-db "/bin/mandb") + "--quiet" "--create" + "-C" "man_db.conf")) + (duration (time-difference (current-time) start-time))) + (format #t "done in ~,3f s~%" + (+ (time-second duration) + (* (time-nanosecond duration) (expt 10 -9)))) + (force-output) + (zero? exit-status)))) (gexp->derivation "manual-database" build #:modules '((guix build utils) + (srfi srfi-19) (srfi srfi-26)) #:local-build? #t)) -- 2.12.2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable -- For reference, the last bit of conversation which occured on guix-devel regarding this was: myglc2 writes: [...] > Hi Maxim and Ludo=E2=80=99, > > I hacked profiles.scm (please see git diff below) so that start and end > seconds appear in the message like this: > > creating manual page database for 23 packages...1494773268...1494773275 D= ONE > > I tested a few cases and man-db typically takes only a few seconds. It > only _appears_ to take a long time because other processing occurs after > the man-db command. > > So, I suggest either ... > > 1) delete the message altogether, or > 2) close the message with a "DONE" > > SORRY for the run-around. In my defense, when I first raised the > question I did suggest the idea of closing the message: > No need to be sorry; improvements/ideas are always welcome! :) > http://lists.gnu.org/archive/html/guix-devel/2017-04/msg00196.html > > HTH, George > > g1@g1 ~/src/guix [env]$ git diff > diff --git a/guix/profiles.scm b/guix/profiles.scm > index eb172ef45..4dbf44a81 100644 > --- a/guix/profiles.scm > +++ b/guix/profiles.scm > @@ -1011,13 +1011,15 @@ the entries in MANIFEST." > (mkdir-p man-directory) > (setenv "MANPATH" (string-join entries ":")) >=20=20 > - (format #t "creating manual page database for ~a packages...~%" > - (length entries)) > + (format #t "creating manual page database for ~a packages...~a" > + (length entries)(current-time)) > (force-output) >=20=20 > (zero? (system* #+(file-append man-db "/bin/mandb") > "--quiet" "--create" > - "-C" "man_db.conf")))) > + "-C" "man_db.conf")) > + (format #t "...~a DONE~%" (current-time)) > + (force-output))) >=20=20 > (gexp->derivation "manual-database" build > #:modules '((guix build utils) > g1@g1 ~/src/guix [env]$=20 I'd suggest leaving closing the message on the same line, maybe with something like: --8<---------------cut here---------------end--------------->8--- diff --git a/guix/profiles.scm b/guix/profiles.scm index eb172ef450..6733f105e3 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -957,6 +957,7 @@ the entries in MANIFEST." #~(begin (use-modules (guix build utils) (srfi srfi-1) + (srfi srfi-19) (srfi srfi-26)) =20 (define entries @@ -1011,16 +1012,23 @@ the entries in MANIFEST." (mkdir-p man-directory) (setenv "MANPATH" (string-join entries ":")) =20 - (format #t "creating manual page database for ~a packages...~%" + (format #t "Creating manual page database for ~a packages... " (length entries)) (force-output) - - (zero? (system* #+(file-append man-db "/bin/mandb") - "--quiet" "--create" - "-C" "man_db.conf")))) + (let* ((start-time (current-time)) + (exit-status (system* #+(file-append man-db "/bin/mandb") + "--quiet" "--create" + "-C" "man_db.conf")) + (duration (time-difference (current-time) start-time))) + (format #t "done in ~,3f s~%" + (+ (time-second duration) + (* (time-nanosecond duration) (expt 10 -9)))) + (force-output) + (zero? exit-status)))) =20 (gexp->derivation "manual-database" build #:modules '((guix build utils) + (srfi srfi-19) (srfi srfi-26)) #:local-build? #t)) --8<---------------cut here---------------end--------------->8--- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue May 16 17:12:18 2017 Received: (at submit) by debbugs.gnu.org; 16 May 2017 21:12:18 +0000 Received: from localhost ([127.0.0.1]:49232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAjlR-0002To-Qy for submit@debbugs.gnu.org; Tue, 16 May 2017 17:12:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59701) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dAjlQ-0002Tb-9E for submit@debbugs.gnu.org; Tue, 16 May 2017 17:12:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAjlK-0008HH-CO for submit@debbugs.gnu.org; Tue, 16 May 2017 17:12:10 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40690) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dAjlK-0008H6-9L for submit@debbugs.gnu.org; Tue, 16 May 2017 17:12:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAjlJ-0006oO-Cg for guix-patches@gnu.org; Tue, 16 May 2017 17:12:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAjlI-0008Gq-Kn for guix-patches@gnu.org; Tue, 16 May 2017 17:12:09 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAjlF-0008GE-03; Tue, 16 May 2017 17:12:05 -0400 Received: from reverse-83.fdn.fr ([80.67.176.83]:46996 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dAjlE-0005IE-7w; Tue, 16 May 2017 17:12:04 -0400 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Maxim Cournoyer Subject: Re: [PATCH] Add Add elapsed time to manual-database hook to output message References: <20170405205638.12336.78854@vcs0.savannah.gnu.org> <20170405205640.15AE6210A4@vcs0.savannah.gnu.org> <86y3v9bicq.fsf@gmail.com> <864lxxghmm.fsf@gmail.com> <87a87ibjq1.fsf@gmail.com> <871ssn4ebg.fsf_-_@gnu.org> <87fug8j704.fsf@gmail.com> <8637c7cv5v.fsf@gmail.com> <87r2zqhyw4.fsf_-_@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 27 =?utf-8?Q?Flor=C3=A9al?= an 225 de la =?utf-8?Q?R?= =?utf-8?Q?=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-unknown-linux-gnu Date: Tue, 16 May 2017 23:12:01 +0200 In-Reply-To: <87r2zqhyw4.fsf_-_@gmail.com> (Maxim Cournoyer's message of "Mon, 15 May 2017 09:23:55 -0700") Message-ID: <87shk433ry.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: myglc2 , guix-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Maxim Cournoyer skribis: > From 3ec52305f6a1836b42e34b4dc194c16afb1592a2 Mon Sep 17 00:00:00 2001 > From: Maxim Cournoyer > Date: Mon, 15 May 2017 09:05:48 -0700 > Subject: [PATCH] profiles: Add elapsed time to manual-database hook to ou= tput > message. > > * guix/profiles.scm (manual-database): Add elapsed time to manual-database > hook to output message. Applied, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue May 30 17:29:50 2017 Received: (at 26942-done) by debbugs.gnu.org; 30 May 2017 21:29:50 +0000 Received: from localhost ([127.0.0.1]:45815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFoi5-0007xh-PA for submit@debbugs.gnu.org; Tue, 30 May 2017 17:29:49 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFoi4-0007xZ-CK for 26942-done@debbugs.gnu.org; Tue, 30 May 2017 17:29:48 -0400 Received: from localhost (port-92-200-122-160.dynamic.qsc.de [92.200.122.160]) by mx.zohomail.com with SMTPS id 1496179785237169.34817631776366; Tue, 30 May 2017 14:29:45 -0700 (PDT) References: <20170405205638.12336.78854@vcs0.savannah.gnu.org> <20170405205640.15AE6210A4@vcs0.savannah.gnu.org> <86y3v9bicq.fsf@gmail.com> <864lxxghmm.fsf@gmail.com> <87a87ibjq1.fsf@gmail.com> <871ssn4ebg.fsf_-_@gnu.org> <87fug8j704.fsf@gmail.com> <8637c7cv5v.fsf@gmail.com> <87r2zqhyw4.fsf_-_@gmail.com> <87shk433ry.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.2.1 From: Ricardo Wurmus To: 26942-done@debbugs.gnu.org Subject: Re: bug#26942: [PATCH] Add Add elapsed time to manual-database hook to output message In-reply-to: <87shk433ry.fsf@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Tue, 30 May 2017 23:29:42 +0200 Message-ID: <87mv9u2fuh.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 26942-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.8 (-) Ludovic Courtès writes: > Maxim Cournoyer skribis: > >> From 3ec52305f6a1836b42e34b4dc194c16afb1592a2 Mon Sep 17 00:00:00 2001 >> From: Maxim Cournoyer >> Date: Mon, 15 May 2017 09:05:48 -0700 >> Subject: [PATCH] profiles: Add elapsed time to manual-database hook to output >> message. >> >> * guix/profiles.scm (manual-database): Add elapsed time to manual-database >> hook to output message. > > Applied, thanks! Closing. From unknown Fri Aug 22 01:33:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 28 Jun 2017 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator