Re: [PATCH 1/2] WIP: add performance test for removing files.

Subject: Re: [PATCH 1/2] WIP: add performance test for removing files.

Date: Thu, 15 Apr 2021 10:36:27 +0300

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Tue, Apr 13 2021, David Bremner wrote:

> No doubt this is non-portable use of tar.

portable alternative(s) (?)

(we probably can trust no file names start with '-')

> ---
>  performance-test/T00-new.sh | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/performance-test/T00-new.sh b/performance-test/T00-new.sh
> index a14dd13f..1eeac6d0 100755
> --- a/performance-test/T00-new.sh
> +++ b/performance-test/T00-new.sh
> @@ -26,6 +26,16 @@ perl -nle 'rename "$_.renamed", $_' $manifest
>  
>  time_run "new ($count mv back)" 'notmuch new'
>  
> +tar --create --file backup.tar --files-from=$manifest

xargs tar cf backup.tar < $manifest

> +perl -nle 'unlink $_; unlink $_.copy' $manifest
> +
> +time_run "new ($count rm)" 'notmuch new'
> +
> +tar --extract --file backup.tar

tar xf backup.tar

> +
> +time_run "new ($count restore)" 'notmuch new'
> +
>  perl -nle 'link $_, "$_.copy"' $manifest
>  
>  time_run "new ($count cp)" 'notmuch new'
> -- 
> 2.30.2
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: