diff options
Diffstat (limited to 'tests/storage/test_phrase_table.cpp')
-rw-r--r-- | tests/storage/test_phrase_table.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/storage/test_phrase_table.cpp b/tests/storage/test_phrase_table.cpp index 3c4c489..968a9f8 100644 --- a/tests/storage/test_phrase_table.cpp +++ b/tests/storage/test_phrase_table.cpp @@ -34,6 +34,12 @@ int main(int argc, char * argv[]){ guint32 start = record_time(); for ( size_t i = 0; i < bench_times; ++i){ largetable.search(phrase_len, new_phrase, tokens); + + /* clear tokens. */ + for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) { + if (tokens[i]) + g_array_set_size(tokens[i], 0); + } } print_time(start, bench_times); |