YugabyteDB (2.13.0.0-b42, bfc6a6643e7399ac8a0e81d06a3ee6d6571b33ab)

Coverage Report

Created: 2022-03-09 17:30

/Users/deen/code/yugabyte-db/src/yb/rocksdb/util/options_sanity_check.cc
Line
Count
Source
1
// Copyright (c) 2011-present, Facebook, Inc.  All rights reserved.
2
// This source code is licensed under the BSD-style license found in the
3
// LICENSE file in the root directory of this source tree. An additional grant
4
// of patent rights can be found in the PATENTS file in the same directory.
5
//
6
// The following only applies to changes made to this file as part of YugaByte development.
7
//
8
// Portions Copyright (c) YugaByte, Inc.
9
//
10
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
11
// in compliance with the License.  You may obtain a copy of the License at
12
//
13
// http://www.apache.org/licenses/LICENSE-2.0
14
//
15
// Unless required by applicable law or agreed to in writing, software distributed under the License
16
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
17
// or implied.  See the License for the specific language governing permissions and limitations
18
// under the License.
19
//
20
21
#ifndef ROCKSDB_LITE
22
23
#include "yb/rocksdb/util/options_sanity_check.h"
24
25
namespace rocksdb {
26
27
namespace {
28
OptionsSanityCheckLevel SanityCheckLevelHelper(
29
    const std::unordered_map<std::string, OptionsSanityCheckLevel>& smap,
30
119M
    const std::string& name) {
31
119M
  auto iter = smap.find(name);
32
115M
  return iter != smap.end() ? iter->second : kSanityLevelExactMatch;
33
119M
}
34
}
35
36
OptionsSanityCheckLevel DBOptionSanityCheckLevel(
37
56.8M
    const std::string& option_name) {
38
56.8M
  return SanityCheckLevelHelper(sanity_level_db_options, option_name);
39
56.8M
}
40
41
OptionsSanityCheckLevel CFOptionSanityCheckLevel(
42
46.2M
    const std::string& option_name) {
43
46.2M
  return SanityCheckLevelHelper(sanity_level_cf_options, option_name);
44
46.2M
}
45
46
OptionsSanityCheckLevel BBTOptionSanityCheckLevel(
47
17.0M
    const std::string& option_name) {
48
17.0M
  return SanityCheckLevelHelper(sanity_level_bbt_options, option_name);
49
17.0M
}
50
51
}  // namespace rocksdb
52
53
#endif  // !ROCKSDB_LITE