Skip to content

Commit 2fbafce

Browse files
committed
journey test for statistics
1 parent befba3b commit 2fbafce

File tree

3 files changed

+41
-6
lines changed

3 files changed

+41
-6
lines changed

tasks.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* [x] for `pretty` binary with support for logging and TUI
3030
* [x] statistics
3131
* [ ] ~~a verbose mode to list each object in a pack, similar to existing git-verify-pack~~
32-
* [ ] journey tests
32+
* [x] journey tests
3333
* [ ] support for serde/miniserde for all returned data types (features per crate)
3434
* **stress**
3535
* [ ] first stress test for validation of a big repository, linux maybe, or something smaller but big enough
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
objects per delta chain length
2+
0: 18
3+
1: 4
4+
2: 3
5+
3: 1
6+
4: 2
7+
5: 1
8+
6: 1
9+
->: 30
10+
11+
averages
12+
delta chain length: 1;
13+
decompressed entry [B]: 3456;
14+
compressed entry [B]: 1725;
15+
decompressed object size [B]: 9621;
16+
17+
compression
18+
compressed entries size : 51.8 KB
19+
decompressed entries size : 103.7 KB
20+
total object size : 288.7 KB
21+
pack size : 51.9 KB
22+
23+
compression ratio : 2.00
24+
delta compression ratio : 5.58
25+
delta gain : 2.78
26+
pack overhead : 0.235%
27+
OK

tests/stateless-journey.sh

+13-5
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,20 @@ title "CLI"
5353
expect_run $SUCCESSFULLY "$exe_plumbing" verify-pack "$PACK_FILE"
5454
}
5555
)
56-
(with "a valid pack file"
56+
(with "a valid pack INDEX file"
5757
PACK_INDEX_FILE="$fixtures/packs/pack-11fdfa9e156ab73caae3b6da867192221f2089c2.idx"
58-
it "verifies the pack index successfully and with desired output" && {
59-
WITH_SNAPSHOT="$snapshot/plumbing-verify-pack-index-success" \
60-
expect_run $SUCCESSFULLY "$exe_plumbing" verify-pack "$PACK_INDEX_FILE"
61-
}
58+
(with "no statistics"
59+
it "verifies the pack index successfully and with desired output" && {
60+
WITH_SNAPSHOT="$snapshot/plumbing-verify-pack-index-success" \
61+
expect_run $SUCCESSFULLY "$exe_plumbing" verify-pack "$PACK_INDEX_FILE"
62+
}
63+
)
64+
(with "statistics"
65+
it "verifies the pack index successfully and with desired output" && {
66+
WITH_SNAPSHOT="$snapshot/plumbing-verify-pack-index-with-statistics-success" \
67+
expect_run $SUCCESSFULLY "$exe_plumbing" verify-pack --statistics "$PACK_INDEX_FILE"
68+
}
69+
)
6270
)
6371
)
6472
)

0 commit comments

Comments
 (0)