run this test manually for the verfication.
(l *List, t *testing.T)
| 102 | |
| 103 | // run this test manually for the verfication. |
| 104 | func PopulateList(l *List, t *testing.T) { |
| 105 | kvOpt := badger.DefaultOptions("p") |
| 106 | ps, err := badger.OpenManaged(kvOpt) |
| 107 | require.NoError(t, err) |
| 108 | txn := ps.NewTransactionAt(math.MaxUint64, false) |
| 109 | defer txn.Discard() |
| 110 | iopts := badger.DefaultIteratorOptions |
| 111 | iopts.AllVersions = true |
| 112 | iopts.PrefetchValues = false |
| 113 | itr := txn.NewIterator(iopts) |
| 114 | defer itr.Close() |
| 115 | var i uint64 |
| 116 | for itr.Rewind(); itr.Valid(); itr.Next() { |
| 117 | item := itr.Item() |
| 118 | if item.ValueSize() < 512 || item.UserMeta() == BitSchemaPosting { |
| 119 | continue |
| 120 | } |
| 121 | pl, err := ReadPostingList(item.Key(), itr) |
| 122 | if err == ErrInvalidKey { |
| 123 | continue |
| 124 | } |
| 125 | require.NoError(t, err) |
| 126 | l.mutationMap.committedEntries[i] = pl.plist |
| 127 | i++ |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | // Test21MillionDataSet populate the list and do size calculation and profiling |
| 132 | // size calculation and write it to file. |
no test coverage detected