tests/test-debug-rebuild-dirstate.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 21 Feb 2024 13:05:29 +0100
changeset 51420 ac1c75188440
parent 51181 dcaa2df1f688
permissions -rw-r--r--
phases: invalidate the phases set less often on retract boundary We already have the information to update the phase set, so we do so directly instead of invalidating the cache. This show a sizeable speedup in our `perf::unbundle` benchmark on the many-draft mozilla-try repository. ### data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog # benchmark.name = hg.perf.perf-unbundle # bin-env-vars.hg.flavor = no-rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.issue6528 = disabled # benchmark.variants.revs = last-10 before: 2.055259 seconds after: 1.887064 seconds (-8.18%) # benchmark.variants.revs = last-100 before: 2.409239 seconds after: 2.222429 seconds (-7.75%) # benchmark.variants.revs = last-1000 before: 3.945648 seconds after: 3.762480 seconds (-4.64%)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50724
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     1
#require rust
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     2
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     3
  $ cat >> $HGRCPATH << EOF
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     4
  > [format]
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     5
  > use-dirstate-v2=1
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     6
  > [storage]
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     7
  > dirstate-v2.slow-path=allow
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     8
  > EOF
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     9
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    10
  $ hg init t
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    11
  $ cd t
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    12
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    13
  $ for i in 1 2 3 4 5 6 7 8 9 10; do touch foobar$i; done
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    14
  $ hg add .
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    15
  adding foobar1
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    16
  adding foobar10
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    17
  adding foobar2
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    18
  adding foobar3
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    19
  adding foobar4
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    20
  adding foobar5
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    21
  adding foobar6
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    22
  adding foobar7
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    23
  adding foobar8
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    24
  adding foobar9
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    25
  $ hg commit -m "1"
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    26
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    27
Check that there's no space leak on debugrebuilddirstate
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    28
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    29
  $ f --size .hg/dirstate*
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    30
  .hg/dirstate: size=133
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    31
  .hg/dirstate.88698448: size=511
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    32
  $ hg debugrebuilddirstate
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    33
  $ f --size .hg/dirstate*
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    34
  .hg/dirstate: size=133
a10d823a8e3d dirstate: avoid leaking disk space in `hg debugrebuilddirstate`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    35
  .hg/dirstate.6b8ab34b: size=511
51181
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50724
diff changeset
    36
  $ hg debugrebuilddirstate
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50724
diff changeset
    37
  $ f --size .hg/dirstate*
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50724
diff changeset
    38
  .hg/dirstate: size=133
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50724
diff changeset
    39
  .hg/dirstate.b875dfc5: size=511