ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib/tests
Yuya Nishihara 3c7aa75b9b index: switch to persistent change id index
The shortest change id prefix will become a few digits longer, but I think
that's acceptable. Entries included in the "revsets.short-prefixes" set are
unaffected.

The reachable set is calculated eagerly, but this is still faster as we no
longer need to sort the reachable entries by change id. The lazy version will
save another ~100ms in mid-size repos.

"jj log" without working copy snapshot:
```
% hyperfine --sort command --warmup 3 --runs 20 -L bin jj-0,jj-1,jj-2 \
  -s "target/release-with-debug/{bin} -R ~/mirrors/linux debug reindex" \
  "target/release-with-debug/{bin} -R ~/mirrors/linux \
   --ignore-working-copy log -r.. -l100 --config-toml='revsets.short-prefixes=\"\"'"
Benchmark 1: target/release-with-debug/jj-0 -R ~/mirrors/linux --ignore-working-copy log -r.. -l100 --config-toml='revsets.short-prefixes=""'
  Time (mean ± σ):     353.6 ms ±  11.9 ms    [User: 266.7 ms, System: 87.0 ms]
  Range (min … max):   329.0 ms … 365.6 ms    20 runs

Benchmark 2: target/release-with-debug/jj-1 -R ~/mirrors/linux --ignore-working-copy log -r.. -l100 --config-toml='revsets.short-prefixes=""'
  Time (mean ± σ):     271.3 ms ±   9.9 ms    [User: 183.8 ms, System: 87.7 ms]
  Range (min … max):   250.5 ms … 282.7 ms    20 runs

Relative speed comparison
        1.99 ±  0.16  target/release-with-debug/jj-0 -R ~/mirrors/linux --ignore-working-copy log -r.. -l100 --config-toml='revsets.short-prefixes=""'
        1.53 ±  0.12  target/release-with-debug/jj-1 -R ~/mirrors/linux --ignore-working-copy log -r.. -l100 --config-toml='revsets.short-prefixes=""'
```

"jj status" with working copy snapshot (watchman enabled):
```
% hyperfine --sort command --warmup 3 --runs 20 -L bin jj-0,jj-1,jj-2 \
  -s "target/release-with-debug/{bin} -R ~/mirrors/linux debug reindex" \
  "target/release-with-debug/{bin} -R ~/mirrors/linux \
   status --config-toml='revsets.short-prefixes=\"\"'"
Benchmark 1: target/release-with-debug/jj-0 -R ~/mirrors/linux status --config-toml='revsets.short-prefixes=""'
  Time (mean ± σ):     396.6 ms ±  10.1 ms    [User: 300.7 ms, System: 94.0 ms]
  Range (min … max):   373.6 ms … 408.0 ms    20 runs

Benchmark 2: target/release-with-debug/jj-1 -R ~/mirrors/linux status --config-toml='revsets.short-prefixes=""'
  Time (mean ± σ):     318.6 ms ±  12.6 ms    [User: 219.1 ms, System: 94.1 ms]
  Range (min … max):   294.2 ms … 333.0 ms    20 runs

Relative speed comparison
        1.85 ±  0.14  target/release-with-debug/jj-0 -R ~/mirrors/linux status --config-toml='revsets.short-prefixes=""'
        1.48 ±  0.12  target/release-with-debug/jj-1 -R ~/mirrors/linux status --config-toml='revsets.short-prefixes=""'
```
2024-02-18 09:44:57 +09:00
..
runner.rs compile integration tests as a single binary 2024-02-06 18:19:41 -08:00
test_bad_locking.rs transaction: take description at end instead of start 2023-12-13 08:12:49 -08:00
test_commit_builder.rs object_id: make ObjectId constructors non-trait methods 2024-01-05 23:36:57 +09:00
test_commit_concurrent.rs op_store: add a virtual root operation, similar to root commit 2024-01-14 10:15:14 -08:00
test_conflicts.rs conflicts: test materialization with with negative snapshots 2024-01-23 07:18:54 -08:00
test_default_revset_graph_iterator.rs default_index: adopt revset engine and graph iterator modules 2024-01-07 05:37:47 -08:00
test_diff_summary.rs repo_path: split RepoPath into owned and borrowed types 2023-11-28 07:33:28 +09:00
test_git.rs tests: fix concurrent git read/write test to retry on ref lock contention 2024-02-17 15:09:27 +09:00
test_git_backend.rs git_backend: on gc(), remove unreachable no-gc refs and compact them 2024-01-27 10:18:11 +09:00
test_id_prefix.rs object_id: move HexPrefix and PrefixResolution from index module 2024-01-05 10:20:57 +09:00
test_index.rs index: switch to persistent change id index 2024-02-18 09:44:57 +09:00
test_init.rs transaction: take description at end instead of start 2023-12-13 08:12:49 -08:00
test_load_repo.rs transaction: take description at end instead of start 2023-12-13 08:12:49 -08:00
test_local_working_copy.rs test_local_working_copy: use std::fs:write instead of OpenOptions 2024-02-10 16:06:28 -08:00
test_local_working_copy_concurrent.rs repo_path: split RepoPath into owned and borrowed types 2023-11-28 07:33:28 +09:00
test_local_working_copy_sparse.rs working_copy: use proto file states without rebuilding BTreeMap 2023-11-30 12:09:31 +09:00
test_merge_trees.rs transaction: take description at end instead of start 2023-12-13 08:12:49 -08:00
test_merged_tree.rs clippy: new nightly fixes 2024-02-10 16:06:28 -08:00
test_mut_repo.rs view: drop tracking of public heads 2024-01-13 22:23:57 -08:00
test_operations.rs Fix the ContentHash implementations for std::Option, MergedTreeId, and RemoteRefState 2024-02-16 09:27:32 -05:00
test_refs.rs transaction: take description at end instead of start 2023-12-13 08:12:49 -08:00
test_revset.rs doc, tests: drop use of deprecated revset dag range operator 2024-02-14 10:04:56 +09:00
test_rewrite.rs clippy: new nightly fixes 2024-02-10 16:06:28 -08:00
test_signing.rs transaction: take description at end instead of start 2023-12-13 08:12:49 -08:00
test_view.rs view: drop tracking of public heads 2024-01-13 22:23:57 -08:00
test_workspace.rs working_copy: add Send supertrait 2024-02-17 15:13:25 +08:00