Home
last modified time | relevance | path

Searched refs:b (Results 1 – 23 of 23) sorted by relevance

/leveldb-1.20/util/
H A Dhistogram.cc46 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 Dtestharness.h61 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 Darena_test.cc43 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 Dcomparator.cc25 virtual int Compare(const Slice& a, const Slice& b) const { in Compare()
26 return a.compare(b); in Compare()
H A Dcache_test.cc205 uint64_t b = cache_->NewId(); in TEST() local
206 ASSERT_NE(a, b); in TEST()
/leveldb-1.20/db/
H A Dwrite_batch.cc82 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 Dc.cc66 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 Ddbformat.h119 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 Dwrite_batch_test.cc15 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 Dmemtable.cc37 Slice b = GetLengthPrefixedSlice(bptr); in operator ()() local
38 return comparator.Compare(a, b); in operator ()()
H A Dmemtable.h69 int operator()(const char* a, const char* b) const;
H A Dlog_reader.cc229 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 Dskiplist_test.cc18 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 Dskiplist.h120 bool Equal(const Key& a, const Key& b) const { return (compare_(a, b) == 0); } in Equal() argument
H A Ddb_test.cc128 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 Dc_test.c118 const char* b, size_t blen) { in CmpCompare() argument
120 int r = memcmp(a, b, n); in CmpCompare()
H A Dversion_set.cc283 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 Dslice.h72 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 Dcomparator.h26 virtual int Compare(const Slice& a, const Slice& b) const = 0;
H A Dc.h217 const char* b, size_t blen),
/leveldb-1.20/table/
H A Dblock.cc90 inline int Compare(const Slice& a, const Slice& b) const { in Compare()
91 return comparator_->Compare(a, b); in Compare()
H A Dtable_test.cc44 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 Dindex.md257 // 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