[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#45948] [PATCH 0/5] Improvements to the Automake SRFI 64 test driver
From: |
zimoun |
Subject: |
[bug#45948] [PATCH 0/5] Improvements to the Automake SRFI 64 test driver. |
Date: |
Tue, 02 Feb 2021 09:36:11 +0100 |
Hi,
On Tue, 02 Feb 2021 at 00:47, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
> $ export SCM_LOG_DRIVER_FLAGS="--brief=no --show-duration=yes"
> $ make check TESTS=tests/packages.scm
>
> --8<---------------cut here---------------start------------->8---
> [...]
> PASS: tests/packages.scm - fold-available-packages with/without cache
> [17.121s]
> PASS: tests/packages.scm - find-packages-by-name [0.000s]
> PASS: tests/packages.scm - find-packages-by-name with version [0.000s]
> PASS: tests/packages.scm - find-packages-by-name with cache [9.492s]
> PASS: tests/packages.scm - find-packages-by-name + version, with cache
> [7.412s]
> [...]
> PASS: tests/packages.scm - find-package-locations with cache [7.484s]
> PASS: tests/packages.scm - specification->location [0.000s]
> --8<---------------cut here---------------end--------------->8---
Cool! Thanks Maxim. I find it really better. :-)
>>> We can also check the time the suspected slow test took:
>>>
>>> $ time make check TESTS=tests/packages.scm
>>> SCM_LOG_DRIVER_FLAGS="--select='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²) behavior
>> of the various list operations (the list of packages is big enough!).
>> Fixed in 73744725dd0a65cddaa9251f104f17ca27756479.
Neat! Cool!
Cheers,
simon