Lines Matching refs:options
45 Options options = CurrentOptions(); in GetOptions() local
46 options.create_if_missing = true; in GetOptions()
47 options.avoid_flush_during_recovery = false; in GetOptions()
49 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in GetOptions()
50 options.table_factory.reset(new BlockBasedTableFactory(table_options)); in GetOptions()
51 return options; in GetOptions()
61 void RecordCacheCounters(const Options& options) { in RecordCacheCounters() argument
62 miss_count_ = TestGetTickerCount(options, BLOCK_CACHE_MISS); in RecordCacheCounters()
63 hit_count_ = TestGetTickerCount(options, BLOCK_CACHE_HIT); in RecordCacheCounters()
64 insert_count_ = TestGetTickerCount(options, BLOCK_CACHE_ADD); in RecordCacheCounters()
65 failure_count_ = TestGetTickerCount(options, BLOCK_CACHE_ADD_FAILURES); in RecordCacheCounters()
67 TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_MISS); in RecordCacheCounters()
69 TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_HIT); in RecordCacheCounters()
71 TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_ADD); in RecordCacheCounters()
73 TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_ADD_FAILURES); in RecordCacheCounters()
76 void RecordCacheCountersForCompressionDict(const Options& options) { in RecordCacheCountersForCompressionDict() argument
78 TestGetTickerCount(options, BLOCK_CACHE_COMPRESSION_DICT_MISS); in RecordCacheCountersForCompressionDict()
80 TestGetTickerCount(options, BLOCK_CACHE_COMPRESSION_DICT_HIT); in RecordCacheCountersForCompressionDict()
82 TestGetTickerCount(options, BLOCK_CACHE_COMPRESSION_DICT_ADD); in RecordCacheCountersForCompressionDict()
85 void CheckCacheCounters(const Options& options, size_t expected_misses, in CheckCacheCounters() argument
88 size_t new_miss_count = TestGetTickerCount(options, BLOCK_CACHE_MISS); in CheckCacheCounters()
89 size_t new_hit_count = TestGetTickerCount(options, BLOCK_CACHE_HIT); in CheckCacheCounters()
90 size_t new_insert_count = TestGetTickerCount(options, BLOCK_CACHE_ADD); in CheckCacheCounters()
92 TestGetTickerCount(options, BLOCK_CACHE_ADD_FAILURES); in CheckCacheCounters()
104 const Options& options, size_t expected_compression_dict_misses, in CheckCacheCountersForCompressionDict() argument
108 TestGetTickerCount(options, BLOCK_CACHE_COMPRESSION_DICT_MISS); in CheckCacheCountersForCompressionDict()
110 TestGetTickerCount(options, BLOCK_CACHE_COMPRESSION_DICT_HIT); in CheckCacheCountersForCompressionDict()
112 TestGetTickerCount(options, BLOCK_CACHE_COMPRESSION_DICT_ADD); in CheckCacheCountersForCompressionDict()
125 void CheckCompressedCacheCounters(const Options& options, in CheckCompressedCacheCounters() argument
131 TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_MISS); in CheckCompressedCacheCounters()
133 TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_HIT); in CheckCompressedCacheCounters()
135 TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_ADD); in CheckCompressedCacheCounters()
137 TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_ADD_FAILURES); in CheckCompressedCacheCounters()
153 auto options = GetOptions(table_options); in TEST_F() local
154 InitTable(options); in TEST_F()
158 options.table_factory.reset(new BlockBasedTableFactory(table_options)); in TEST_F()
159 Reopen(options); in TEST_F()
160 RecordCacheCounters(options); in TEST_F()
177 auto options = GetOptions(table_options); in TEST_F() local
178 InitTable(options); in TEST_F()
182 options.table_factory.reset(new BlockBasedTableFactory(table_options)); in TEST_F()
183 Reopen(options); in TEST_F()
184 RecordCacheCounters(options); in TEST_F()
194 CheckCacheCounters(options, 1, 0, 1, 0); in TEST_F()
207 CheckCacheCounters(options, 1, 0, 0, 1); in TEST_F()
214 CheckCacheCounters(options, 0, 0, 0, 0); in TEST_F()
221 CheckCacheCounters(options, 0, 1, 0, 0); in TEST_F()
230 auto options = GetOptions(table_options); in TEST_F() local
231 options.compression = CompressionType::kSnappyCompression; in TEST_F()
232 InitTable(options); in TEST_F()
238 options.table_factory.reset(new BlockBasedTableFactory(table_options)); in TEST_F()
239 Reopen(options); in TEST_F()
240 RecordCacheCounters(options); in TEST_F()
250 CheckCacheCounters(options, 1, 0, 1, 0); in TEST_F()
251 CheckCompressedCacheCounters(options, 1, 0, 1, 0); in TEST_F()
270 CheckCacheCounters(options, 1, 0, 0, 1); in TEST_F()
271 CheckCompressedCacheCounters(options, 1, 0, 1, 0); in TEST_F()
281 CheckCacheCounters(options, 1, 0, 1, 0); in TEST_F()
282 CheckCompressedCacheCounters(options, 0, 1, 0, 0); in TEST_F()
293 Options options = CurrentOptions(); in TEST_F() local
294 options.create_if_missing = true; in TEST_F()
295 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_F()
299 options.table_factory.reset(new BlockBasedTableFactory(table_options)); in TEST_F()
300 CreateAndReopenWithCF({"pikachu"}, options); in TEST_F()
307 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_F()
308 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_F()
310 TestGetTickerCount(options, BLOCK_CACHE_ADD)); in TEST_F()
311 ASSERT_EQ(0, TestGetTickerCount(options, BLOCK_CACHE_DATA_MISS)); in TEST_F()
323 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_F()
324 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT)); in TEST_F()
327 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_F()
328 ASSERT_EQ(2, TestGetTickerCount(options, BLOCK_CACHE_FILTER_HIT)); in TEST_F()
331 auto index_block_hit = TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT); in TEST_F()
333 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_F()
335 TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT)); in TEST_F()
338 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_F()
340 TestGetTickerCount(options, BLOCK_CACHE_INDEX_HIT)); in TEST_F()
350 auto options = GetOptions(table_options); in TEST_F() local
351 InitTable(options); in TEST_F()
355 options.table_factory.reset(new BlockBasedTableFactory(table_options)); in TEST_F()
356 Reopen(options); in TEST_F()
379 Options options = CurrentOptions(); in TEST_F() local
380 options.create_if_missing = true; in TEST_F()
381 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_F()
393 options.table_factory.reset(new BlockBasedTableFactory(table_options)); in TEST_F()
394 CreateAndReopenWithCF({"pikachu"}, options); in TEST_F()
400 TestGetTickerCount(options, BLOCK_CACHE_INDEX_BYTES_INSERT); in TEST_F()
402 TestGetTickerCount(options, BLOCK_CACHE_FILTER_BYTES_INSERT); in TEST_F()
419 ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_INDEX_BYTES_INSERT), in TEST_F()
421 ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_FILTER_BYTES_INSERT), in TEST_F()
464 Options options = CurrentOptions(); in TEST_F() local
465 options.create_if_missing = true; in TEST_F()
466 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_F()
473 options.table_factory.reset(new BlockBasedTableFactory(table_options)); in TEST_F()
474 DestroyAndReopen(options); in TEST_F()
486 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_F()
487 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_F()
489 TestGetTickerCount(options, BLOCK_CACHE_ADD)); in TEST_F()
490 ASSERT_EQ(0, TestGetTickerCount(options, BLOCK_CACHE_DATA_MISS)); in TEST_F()
502 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_INDEX_MISS)); in TEST_F()
503 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_FILTER_MISS)); in TEST_F()
505 TestGetTickerCount(options, BLOCK_CACHE_ADD)); in TEST_F()
506 ASSERT_EQ(1, TestGetTickerCount(options, BLOCK_CACHE_DATA_MISS)); in TEST_F()
520 Options options = CurrentOptions(); in TEST_F() local
521 options.create_if_missing = true; in TEST_F()
522 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_F()
523 options.level0_file_num_compaction_trigger = 2; in TEST_F()
524 options.paranoid_file_checks = true; in TEST_F()
528 options.table_factory.reset(new BlockBasedTableFactory(table_options)); in TEST_F()
529 CreateAndReopenWithCF({"pikachu"}, options); in TEST_F()
536 TestGetTickerCount(options, BLOCK_CACHE_ADD)); in TEST_F()
545 TestGetTickerCount(options, BLOCK_CACHE_ADD)); in TEST_F()
560 TestGetTickerCount(options, BLOCK_CACHE_ADD)); in TEST_F()
576 Options options = CurrentOptions(); in TEST_F() local
577 options.write_buffer_size = 64 * 1024; // small write buffer in TEST_F()
578 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_F()
586 options.table_factory.reset(NewBlockBasedTableFactory(table_options)); in TEST_F()
593 options.table_factory.reset(NewBlockBasedTableFactory(table_options)); in TEST_F()
599 options.table_factory.reset(NewBlockBasedTableFactory(table_options)); in TEST_F()
606 options.table_factory.reset(NewBlockBasedTableFactory(table_options)); in TEST_F()
607 options.compression = kNoCompression; in TEST_F()
612 CreateAndReopenWithCF({"pikachu"}, options); in TEST_F()
615 no_block_cache_opts.statistics = options.statistics; in TEST_F()
623 std::vector<Options>({no_block_cache_opts, options})); in TEST_F()
650 ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_MISS), 0); in TEST_F()
651 ASSERT_EQ(TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_MISS), 0); in TEST_F()
655 ASSERT_EQ(TestGetTickerCount(options, BLOCK_CACHE_MISS), 0); in TEST_F()
656 ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_MISS), 0); in TEST_F()
660 ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_MISS), 0); in TEST_F()
661 ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_MISS), 0); in TEST_F()
665 ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_MISS), 0); in TEST_F()
666 ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_HIT), 0); in TEST_F()
667 ASSERT_GT(TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_MISS), 0); in TEST_F()
670 ASSERT_EQ(TestGetTickerCount(options, BLOCK_CACHE_COMPRESSED_HIT), 0); in TEST_F()
676 options.create_if_missing = true; in TEST_F()
677 DestroyAndReopen(options); in TEST_F()
702 Options options = CurrentOptions(); in TEST_F() local
703 options.compression = compression_type; in TEST_F()
704 options.compression_opts.max_dict_bytes = 4096; in TEST_F()
705 options.create_if_missing = true; in TEST_F()
706 options.num_levels = 2; in TEST_F()
707 options.statistics = ROCKSDB_NAMESPACE::CreateDBStatistics(); in TEST_F()
708 options.target_file_size_base = kNumEntriesPerFile * kNumBytesPerEntry; in TEST_F()
712 options.table_factory.reset(new BlockBasedTableFactory(table_options)); in TEST_F()
713 DestroyAndReopen(options); in TEST_F()
715 RecordCacheCountersForCompressionDict(options); in TEST_F()
731 options, kNumFiles /* expected_compression_dict_misses */, in TEST_F()
737 RecordCacheCounters(options); in TEST_F()
738 RecordCacheCountersForCompressionDict(options); in TEST_F()
743 CheckCacheCounters(options, 1 /* expected_misses */, 2 /* expected_hits */, in TEST_F()
746 options, 0 /* expected_compression_dict_misses */, in TEST_F()