bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#65720: Guile-Git-managed checkouts grow way too much


From: Ludovic Courtès
Subject: bug#65720: Guile-Git-managed checkouts grow way too much
Date: Wed, 13 Sep 2023 20:10:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi,

wolf <wolf@wolfsden.cz> skribis:

> (define (time proc)
>   (let* ((start (get-internal-run-time))
>          (_ (proc))
>          (end   (get-internal-run-time)))
>     (exact->inexact (* 1000 (/ (- end start) 
> internal-time-units-per-second)))))
>
> (format #t "Guix: ~ams\nGit:  ~ams\n"
>         (time (λ () (commit-relation c1 c2)))
>         (time (λ () (shelling-commit-relation c1 c2))))

‘get-internal-run-time’ returns “units of processor time” used by the
current process (info "(guile) Time").  When shelling out, the process
calls waitpid(2) and does nothing, so naturally its processor time is
close to zero.

‘get-internal-real-time’ should give something closer to elapsed time.

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]