Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test data #261

Merged
merged 1 commit into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions cmd/desync/info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/stretchr/testify/require"
)


func TestInfoCommand(t *testing.T) {
for _, test := range []struct {
name string
Expand Down Expand Up @@ -55,11 +56,11 @@ func TestInfoCommand(t *testing.T) {
"unique": 131,
"in-store": 131,
"in-seed": 124,
"in-cache": 18,
"not-in-seed-nor-cache": 5,
"in-cache": 25,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is easy to verify by hand. Count the number of files in the cache.

"not-in-seed-nor-cache": 7,
"size": 2097152,
"dedup-size-not-in-seed": 80029,
"dedup-size-not-in-seed-nor-cache": 67099,
"dedup-size-not-in-seed-nor-cache": 80029,
Copy link
Contributor Author

@bearrito bearrito Mar 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This I had to accept on faith. The mixing of seed1 makes it difficult to know what chunks were shared.

"chunk-size-min": 2048,
"chunk-size-avg": 8192,
"chunk-size-max": 32768
Expand All @@ -71,11 +72,11 @@ func TestInfoCommand(t *testing.T) {
"unique": 131,
"in-store": 131,
"in-seed": 0,
"in-cache": 18,
"not-in-seed-nor-cache": 113,
"in-cache": 25,
"not-in-seed-nor-cache": 106,
"size": 2097152,
"dedup-size-not-in-seed": 1114112,
"dedup-size-not-in-seed-nor-cache": 950410,
"dedup-size-not-in-seed-nor-cache": 853943,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this I took the total value as 1114112.

I then traversed the blob2.cache and summed up the decompressed chunk sizes. That size was 260169
The difference between those values is 853943

"chunk-size-min": 2048,
"chunk-size-avg": 8192,
"chunk-size-max": 32768
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading