guix-patches
[Top][All Lists]
Advanced

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

[bug#39734] [PATCH] scripts: Emit GC hint if free space is lower than ab


From: Pierre Neidhardt
Subject: [bug#39734] [PATCH] scripts: Emit GC hint if free space is lower than absolute and relative threshold.
Date: Tue, 25 Feb 2020 11:22:01 +0100

Ludovic Courtès <address@hidden> writes:

>> +  (let* ((default-absolute-threshold (size->number "5GiB"))
>> +         (default-relative-threshold 0.05)
>> +         (percentage->float (lambda (percentage)
>> +                              (or (and=> (string->number
>> +                                          (car (string-split percentage 
>> #\%)))
>
> Mayes just: (string-drop-right percentage 1).

This does not work if the value does not have a percent sign, e.g. it
turns "13" into "1".

Resubmitting the patch with the other change.
Feel free to merge! ;)

-- 
Pierre Neidhardt
https://ambrevar.xyz/

Attachment: signature.asc
Description: PGP signature


reply via email to

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