mirror of
https://github.com/restic/restic.git
synced 2026-11-24 07:13:50 +00:00
Add and use MasterIndex
This commit is contained in:
1 parent
64fa89d406
commit
86fcd170f6
10 files changed
+347
-108
No files matched your search
+10
-8
@@ -209,15 +209,17 @@ func BenchmarkLoadTree(t *testing.B) {
|
||||
list := make([]backend.ID, 0, 10)
|
||||
done := make(chan struct{})
|
||||
|
||||
for blob := range repo.Index().Each(done) {
|
||||
if blob.Type != pack.Tree {
|
||||
continue
|
||||
}
|
||||
for _, idx := range repo.Index().All() {
|
||||
for blob := range idx.Each(done) {
|
||||
if blob.Type != pack.Tree {
|
||||
continue
|
||||
}
|
||||
|
||||
list = append(list, blob.ID)
|
||||
if len(list) == cap(list) {
|
||||
close(done)
|
||||
break
|
||||
list = append(list, blob.ID)
|
||||
if len(list) == cap(list) {
|
||||
close(done)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user