diff tests/test-repo-compengines.t @ 42046:4ee906aa7b60

compression: introduce an official `format.revlog-compression` option This option supersedes the `experiment.format.compression` option. The value currently supported are zlib (default) and zstd (if Mercurial was compiled with zstd support). The option gained an explicit reference to `revlog` since this is the target usage here. Different storage methods might require different compression strategies. In our tests, using zstd give a significant CPU usage improvement (both compression and decompressing) while keeping similar repository size. Zstd as other interresting mode (dictionnary, pre-text, etc?) that are probably worth exploring. However, just plain switching from zlib to zstd provide a large benefit.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 27 Mar 2019 18:26:54 +0100
parents bb271ec2fbfb
children 10a6725dca6e
line wrap: on
line diff
--- a/tests/test-repo-compengines.t	Tue Apr 02 11:03:46 2019 -0700
+++ b/tests/test-repo-compengines.t	Wed Mar 27 18:26:54 2019 +0100
@@ -21,8 +21,8 @@
 
 Unknown compression engine to format.compression aborts
 
-  $ hg --config experimental.format.compression=unknown init unknown
-  abort: compression engine unknown defined by experimental.format.compression not available
+  $ hg --config format.revlog-compression=unknown init unknown
+  abort: compression engine unknown defined by format.revlog-compression not available
   (run "hg debuginstall" to list available compression engines)
   [255]
 
@@ -40,7 +40,7 @@
 
 #if zstd
 
-  $ hg --config experimental.format.compression=zstd init zstd
+  $ hg --config format.revlog-compression=zstd init zstd
   $ cd zstd
   $ cat .hg/requires
   dotencode
@@ -66,7 +66,7 @@
 
   $ cd default
   $ touch bar
-  $ hg --config experimental.format.compression=zstd -q commit -A -m 'add bar with a lot of repeated repeated repeated text'
+  $ hg --config format.revlog-compression=zstd -q commit -A -m 'add bar with a lot of repeated repeated repeated text'
 
   $ cat .hg/requires
   dotencode
@@ -141,13 +141,13 @@
 checking zstd options
 =====================
 
-  $ hg init zstd-level-default --config experimental.format.compression=zstd
-  $ hg init zstd-level-1 --config experimental.format.compression=zstd
+  $ hg init zstd-level-default --config format.revlog-compression=zstd
+  $ hg init zstd-level-1 --config format.revlog-compression=zstd
   $ cat << EOF >> zstd-level-1/.hg/hgrc
   > [storage]
   > revlog.zstd.level=1
   > EOF
-  $ hg init zstd-level-22 --config experimental.format.compression=zstd
+  $ hg init zstd-level-22 --config format.revlog-compression=zstd
   $ cat << EOF >> zstd-level-22/.hg/hgrc
   > [storage]
   > revlog.zstd.level=22
@@ -172,7 +172,7 @@
 
 Test error cases
 
-  $ hg init zstd-level-invalid --config experimental.format.compression=zstd
+  $ hg init zstd-level-invalid --config format.revlog-compression=zstd
   $ cat << EOF >> zstd-level-invalid/.hg/hgrc
   > [storage]
   > revlog.zstd.level=foobar
@@ -182,7 +182,7 @@
   abort: storage.revlog.zstd.level is not a valid integer ('foobar')
   [255]
 
-  $ hg init zstd-level-out-of-range --config experimental.format.compression=zstd
+  $ hg init zstd-level-out-of-range --config format.revlog-compression=zstd
   $ cat << EOF >> zstd-level-out-of-range/.hg/hgrc
   > [storage]
   > revlog.zstd.level=42