| /leveldb-1.20/util/ |
| H A D | histogram.cc | 46 int b = 0; in Add() local 47 while (b < kNumBuckets - 1 && kBucketLimit[b] <= value) { in Add() 48 b++; in Add() 50 buckets_[b] += 1.0; in Add() 64 for (int b = 0; b < kNumBuckets; b++) { in Merge() local 65 buckets_[b] += other.buckets_[b]; in Merge() 76 for (int b = 0; b < kNumBuckets; b++) { in Percentile() local 77 sum += buckets_[b]; in Percentile() 80 double left_point = (b == 0) ? 0 : kBucketLimit[b-1]; in Percentile() 119 for (int b = 0; b < kNumBuckets; b++) { in ToString() local [all …]
|
| H A D | testharness.h | 61 Tester& Is(bool b, const char* msg) { in Is() argument 62 if (!b) { in Is() 107 #define ASSERT_EQ(a,b) ::leveldb::test::Tester(__FILE__, __LINE__).IsEq((a),(b)) argument 108 #define ASSERT_NE(a,b) ::leveldb::test::Tester(__FILE__, __LINE__).IsNe((a),(b)) argument 109 #define ASSERT_GE(a,b) ::leveldb::test::Tester(__FILE__, __LINE__).IsGe((a),(b)) argument 110 #define ASSERT_GT(a,b) ::leveldb::test::Tester(__FILE__, __LINE__).IsGt((a),(b)) argument 111 #define ASSERT_LE(a,b) ::leveldb::test::Tester(__FILE__, __LINE__).IsLe((a),(b)) argument 112 #define ASSERT_LT(a,b) ::leveldb::test::Tester(__FILE__, __LINE__).IsLt((a),(b)) argument 114 #define TCONCAT(a,b) TCONCAT1(a,b) argument 115 #define TCONCAT1(a,b) a##b argument
|
| H A D | arena_test.cc | 43 for (size_t b = 0; b < s; b++) { in TEST() local 45 r[b] = i % 256; in TEST() 57 for (size_t b = 0; b < num_bytes; b++) { in TEST() local 59 ASSERT_EQ(int(p[b]) & 0xff, i % 256); in TEST()
|
| H A D | comparator.cc | 25 virtual int Compare(const Slice& a, const Slice& b) const { in Compare() 26 return a.compare(b); in Compare()
|
| H A D | cache_test.cc | 205 uint64_t b = cache_->NewId(); in TEST() local 206 ASSERT_NE(a, b); in TEST()
|
| /leveldb-1.20/db/ |
| H A D | write_batch.cc | 82 int WriteBatchInternal::Count(const WriteBatch* b) { in Count() argument 83 return DecodeFixed32(b->rep_.data() + 8); in Count() 86 void WriteBatchInternal::SetCount(WriteBatch* b, int n) { in SetCount() argument 87 EncodeFixed32(&b->rep_[8], n); in SetCount() 90 SequenceNumber WriteBatchInternal::Sequence(const WriteBatch* b) { in Sequence() argument 91 return SequenceNumber(DecodeFixed64(b->rep_.data())); in Sequence() 95 EncodeFixed64(&b->rep_[0], seq); in SetSequence() 128 Status WriteBatchInternal::InsertInto(const WriteBatch* b, in InsertInto() argument 131 inserter.sequence_ = WriteBatchInternal::Sequence(b); in InsertInto() 133 return b->Iterate(&inserter); in InsertInto() [all …]
|
| H A D | c.cc | 66 const char* b, size_t blen); 74 return (*compare_)(state_, a.data(), a.size(), b.data(), b.size()); in Compare() 271 Slice a, b; in leveldb_compact_range() local 275 (limit_key ? (b = Slice(limit_key, limit_key_len), &b) : NULL)); in leveldb_compact_range() 342 delete b; in leveldb_writebatch_destroy() 346 b->rep.Clear(); in leveldb_writebatch_clear() 350 leveldb_writebatch_t* b, in leveldb_writebatch_put() argument 357 leveldb_writebatch_t* b, in leveldb_writebatch_delete() argument 359 b->rep.Delete(Slice(key, klen)); in leveldb_writebatch_delete() 363 leveldb_writebatch_t* b, in leveldb_writebatch_iterate() argument [all …]
|
| H A D | dbformat.h | 119 virtual int Compare(const Slice& a, const Slice& b) const; 127 int Compare(const InternalKey& a, const InternalKey& b) const; 172 const InternalKey& a, const InternalKey& b) const { in Compare() argument 173 return Compare(a.Encode(), b.Encode()); in Compare()
|
| H A D | write_batch_test.cc | 15 static std::string PrintContents(WriteBatch* b) { in PrintContents() argument 20 Status s = WriteBatchInternal::InsertInto(b, mem); in PrintContents() 48 } else if (count != WriteBatchInternal::Count(b)) { in PrintContents()
|
| H A D | memtable.cc | 37 Slice b = GetLengthPrefixedSlice(bptr); in operator ()() local 38 return comparator.Compare(a, b); in operator ()()
|
| H A D | memtable.h | 69 int operator()(const char* a, const char* b) const;
|
| H A D | log_reader.cc | 229 const uint32_t b = static_cast<uint32_t>(header[5]) & 0xff; in ReadPhysicalRecord() local 231 const uint32_t length = a | (b << 8); in ReadPhysicalRecord()
|
| H A D | skiplist_test.cc | 18 int operator()(const Key& a, const Key& b) const { in operator ()() 19 if (a < b) { in operator ()() 21 } else if (a > b) { in operator ()()
|
| H A D | skiplist.h | 120 bool Equal(const Key& a, const Key& b) const { return (compare_(a, b) == 0); } in Equal() argument
|
| H A D | db_test.cc | 128 ManifestFile(SpecialEnv* env, WritableFile* b) : env_(env), base_(b) { } in NewWritableFile() argument 1401 virtual int Compare(const Slice& a, const Slice& b) const { in TEST() 1402 return BytewiseComparator()->Compare(a, b); in TEST() 1424 virtual int Compare(const Slice& a, const Slice& b) const { in TEST() 1425 return ToNumber(a) - ToNumber(b); in TEST() 2047 WriteBatch b; in TEST() local 2058 b.Put(k, v); in TEST() 2060 b.Delete(k); in TEST() 2063 ASSERT_OK(model.Write(WriteOptions(), &b)); in TEST() 2064 ASSERT_OK(db_->Write(WriteOptions(), &b)); in TEST()
|
| H A D | c_test.c | 118 const char* b, size_t blen) { in CmpCompare() argument 120 int r = memcmp(a, b, n); in CmpCompare()
|
| H A D | version_set.cc | 283 static bool NewestFirst(FileMetaData* a, FileMetaData* b) { in NewestFirst() argument 284 return a->number > b->number; in NewestFirst()
|
| /leveldb-1.20/include/leveldb/ |
| H A D | slice.h | 72 int compare(const Slice& b) const; 96 inline int Slice::compare(const Slice& b) const { in compare() argument 97 const size_t min_len = (size_ < b.size_) ? size_ : b.size_; in compare() 98 int r = memcmp(data_, b.data_, min_len); in compare() 100 if (size_ < b.size_) r = -1; in compare() 101 else if (size_ > b.size_) r = +1; in compare()
|
| H A D | comparator.h | 26 virtual int Compare(const Slice& a, const Slice& b) const = 0;
|
| H A D | c.h | 217 const char* b, size_t blen),
|
| /leveldb-1.20/table/ |
| H A D | block.cc | 90 inline int Compare(const Slice& a, const Slice& b) const { in Compare() 91 return comparator_->Compare(a, b); in Compare()
|
| H A D | table_test.cc | 44 virtual int Compare(const Slice& a, const Slice& b) const { in Compare() 45 return BytewiseComparator()->Compare(Reverse(a), Reverse(b)); in Compare() 84 bool operator()(const std::string& a, const std::string& b) const { in operator ()() 85 return cmp->Compare(Slice(a), Slice(b)) < 0; in operator ()()
|
| /leveldb-1.20/doc/ |
| H A D | index.md | 257 // if a < b: negative result 258 // if a > b: positive result 260 int Compare(const leveldb::Slice& a, const leveldb::Slice& b) const { 263 ParseKey(b, &b1, &b2); 303 `TwoPartComparator`), (a) keep the same comparator name (b) increment the
|