stablerange: add some data from field testing
This show that in number of stable range to track stay reasonable.
--- a/hgext3rd/evolve/stablerange.py Sun Sep 08 17:50:48 2019 +0200
+++ b/hgext3rd/evolve/stablerange.py Sun Sep 08 21:24:45 2019 +0200
@@ -180,7 +180,8 @@
but in practice the impact stay limited.
The total number of standard subranges stay under control with about
-`O(log2(N))` new stable range introduced for each new revision.
+`O(log2(N))` new stable range introduced for each new revision. In practice the
+total number of stableranges we have is about `O(length(repo))`
In addition, it is worth nothing that the head of the extra ranges we have to
use will match the destination of the "jump" cached by the stablesort
@@ -225,6 +226,127 @@
algorithm should give much faster performance. Combined with commit-time
computation and exchange over the network, the overall impact of this should be
invisible to the user.
+
+The stable range is currently successfully used in production for 2 use cases:
+* obsolescence markers discovery,
+* caching precomputed bundle while serving pulls
+
+practical data
+--------------
+
+The evolve repository:
+
+ number of revisions: 4833
+ number of heads: 15
+ number of merge: 612 ( 12%)
+ number of range: 4826
+ with 2 subranges: 4551 ( 94%)
+ with 3 subranges: 255 ( 5%)
+ with 4 subranges: 12 ( 0%)
+ with 5 subranges: 7 ( 0%)
+ with 8 subranges: 1 ( 0%)
+ average range/revs: 0.99
+
+ Estimated approximative size of a naive compact storage:
+ 41 056 bytes
+ Current size of the sqlite cache (for comparison):
+ 5 312 512 bytes
+
+The mercurial repository:
+
+ number of revisions: 42849
+ number of heads: 2
+ number of merge: 2647 ( 6%)
+ number of range: 41279
+ with 2 subranges: 39740 ( 96%)
+ with 3 subranges: 1494 ( 3%)
+ with 4 subranges: 39 ( 0%)
+ with 5 subranges: 5 ( 0%)
+ with 7 subranges: 1 ( 0%)
+ average range/revs: 0.96
+ Estimated approximative size of a naive compact storage:
+ 342 968 bytes
+ Current size of the sqlite cache (for comparison):
+ 62 803 968 bytes
+
+The pypy repository (very brancy history):
+
+ number of revisions: 97409
+ number of heads: 183
+ number of merge: 8371 ( 8%)
+ number of range: 107025
+ with 2 subranges: 100166 ( 93%)
+ with 3 subranges: 5839 ( 5%)
+ with 4 subranges: 605 ( 0%)
+ with 5 subranges: 189 ( 0%)
+ with 6 subranges: 90 ( 0%)
+ with 7 subranges: 38 ( 0%)
+ with 8 subranges: 18 ( 0%)
+ with 9 subranges: 9 ( 0%)
+ with 10 subranges: 15 ( 0%)
+ with 11 subranges: 4 ( 0%)
+ with 12 subranges: 6 ( 0%)
+ with 13 subranges: 7 ( 0%)
+ with 14 subranges: 6 ( 0%)
+ with 15 subranges: 1 ( 0%)
+ with 16 subranges: 2 ( 0%)
+ with 17 subranges: 2 ( 0%)
+ with 18 subranges: 3 ( 0%)
+ with 19 subranges: 2 ( 0%)
+ with 20 subranges: 3 ( 0%)
+ with 25 subranges: 1 ( 0%)
+ with 27 subranges: 1 ( 0%)
+ with 31 subranges: 3 ( 0%)
+ with 32 subranges: 2 ( 0%)
+ with 33 subranges: 1 ( 0%)
+ with 35 subranges: 1 ( 0%)
+ with 43 subranges: 1 ( 0%)
+ with 44 subranges: 1 ( 0%)
+ with 45 subranges: 2 ( 0%)
+ with 47 subranges: 1 ( 0%)
+ with 51 subranges: 1 ( 0%)
+ with 52 subranges: 1 ( 0%)
+ with 57 subranges: 1 ( 0%)
+ with 65 subranges: 1 ( 0%)
+ with 73 subranges: 1 ( 0%)
+ with 79 subranges: 1 ( 0%)
+ average range/revs: 1.10
+ Estimated approximative size of a naive compact storage:
+ 934 176 bytes
+ Current size of the sqlite cache (for comparison):
+ 201 236 480 bytes
+
+A private and branchy repository:
+
+ number of revisions: 605011
+ number of heads: 14061
+ number of merge: 118109 ( 19%)
+ number of range: 747625
+ with 2 subranges: 595985 ( 79%)
+ with 3 subranges: 130196 ( 17%)
+ with 4 subranges: 14093 ( 1%)
+ with 5 subranges: 4090 ( 0%)
+ with 6 subranges: 741 ( 0%)
+ with 7 subranges: 826 ( 0%)
+ with 8 subranges: 1313 ( 0%)
+ with 9 subranges: 83 ( 0%)
+ with 10 subranges: 22 ( 0%)
+ with 11 subranges: 9 ( 0%)
+ with 12 subranges: 26 ( 0%)
+ with 13 subranges: 5 ( 0%)
+ with 14 subranges: 9 ( 0%)
+ with 15 subranges: 3 ( 0%)
+ with 16 subranges: 212 ( 0%)
+ with 18 subranges: 6 ( 0%)
+ with 19 subranges: 3 ( 0%)
+ with 24 subranges: 1 ( 0%)
+ with 27 subranges: 1 ( 0%)
+ with 32 subranges: 1 ( 0%)
+ average range/revs: 1.23
+ Estimated approximative size of a naive compact storage:
+ 7 501 928 bytes
+ Current size of the sqlite cache (for comparison):
+ 1 950 310 400 bytes
"""
import abc