/5.5.2/kv_engine/xattr/ |
H A D | blob.cc | 74 while (current < blob.len) { in get() 78 if (size > key.len) { in get() 80 if (blob.buf[current + key.len] == '\0' && in get() 81 std::memcmp(blob.buf + current, key.buf, key.len) == 0) { in get() 83 auto* value = blob.buf + current + key.len + 1; in get() 103 while (current < blob.len) { in prune_user_keys() 120 if (old.len == 0) { in remove() 126 const auto offset = old.buf - blob.buf - 1 - key.len - 4; in remove() 127 const auto size = 4 + key.len + 1 + old.len in remove() [all...] |
H A D | utils.cc | 38 const auto* end = (const char*)std::memchr(blob.buf, '\0', blob.len); in trim_string() 47 if (blob.len < 4) { in validate() 55 if (size > blob.len) { in validate() 87 offset += keybuf.len + 1; // swallow the '\0' in validate() 90 if (!is_valid_xattr_key({keybuf.buf, keybuf.len})) { in validate() 96 offset += valuebuf.len + 1; // swallow '\0' in validate() 105 if (kvsize != (keybuf.len + valuebuf.len + 2)) { in validate() 109 if (!keys.insert(std::string{keybuf.buf, keybuf.len}).second) { in validate() 120 // Test that a len does 122 check_len(uint32_t len, size_t size) check_len() argument 132 auto len = ntohl(*lenptr); get_body_offset() local 139 auto len = ntohl(*lenptr); get_body_offset() local [all...] |
/5.5.2/platform/src/ |
H A D | crc32c_sse4_2.cc | 81 uint32_t crc32c_hw_1way(const uint8_t* buf, size_t len, uint32_t crc_in) { in crc32c_hw_1way() argument 84 while ((reinterpret_cast<uintptr_t>(buf) & ALIGN64_MASK) != 0 && len > 0) { in crc32c_hw_1way() 87 len -= sizeof(uint8_t); in crc32c_hw_1way() 91 while (len >= sizeof(crc_max_size_t)) { in crc32c_hw_1way() 94 len -= sizeof(crc_max_size_t); in crc32c_hw_1way() 98 while (len > 0) { in crc32c_hw_1way() 101 len -= sizeof(uint8_t); in crc32c_hw_1way() 110 uint32_t crc32c_hw_short_block(const uint8_t* buf, size_t len, uint32_t crc_in) { in crc32c_hw_short_block() argument 111 // If len is less the 3xSHORT_BLOCK just use the 1-way hw version in crc32c_hw_short_block() 112 if (len < ( in crc32c_hw_short_block() 166 crc32c_hw(const uint8_t* buf, size_t len, uint32_t crc_in) crc32c_hw() argument [all...] |
H A D | crc32c.cc | 70 typedef uint32_t (*crc32c_function) (const uint8_t* buf, size_t len, uint32_t crc_in); 109 /* Construct an operator to apply len zeros to a crc. len must be a power of 110 two. If len is not a power of two, then the result is the same as for the 111 largest power of two less than len. The result for len == 0 is the same as 112 for len == 1. A version of this routine could be easily written for any 113 len, but that is not needed for this application. */ 114 static void crc32c_zeros_op(uint32_t *even, size_t len) { in crc32c_zeros_op() argument 135 on, until len ha in crc32c_zeros_op() 154 crc32c_zeros(uint32_t zeros[SHIFT_TABLE_X][SHIFT_TABLE_Y], size_t len) crc32c_zeros() argument 184 crc32c_sw_1way(const uint8_t* buf, size_t len, uint32_t crc_in) crc32c_sw_1way() argument 212 crc32c_sw_short_block(const uint8_t* buf, size_t len, uint32_t crc_in) crc32c_sw_short_block() argument 264 crc32c_sw(const uint8_t* buf, size_t len, uint32_t crc_in) crc32c_sw() argument 398 crc32c(const uint8_t* buf, size_t len, uint32_t crc_in) crc32c() argument [all...] |
/5.5.2/kv_engine/tests/mcbp/ |
H A D | xattr_blob_validator_test.cc | 39 uint32_t len = htonl(gsl::narrow<uint32_t>(blob.size() - (offset + 4))); in addKvPair() local 40 memcpy(blob.data() + offset, &len, 4); in addKvPair() 43 len = htonl(gsl::narrow<uint32_t>(blob.size() - 4)); in addKvPair() 44 memcpy(blob.data(), &len, 4); in addKvPair() 76 uint32_t len; in TEST_F() local 79 memcpy(&len, blob.data(), sizeof(len)); in TEST_F() 80 len = htonl(ntohl(len) + 1); in TEST_F() 81 memcpy(blob.data(), &len, sizeo in TEST_F() 92 uint32_t len; TEST_F() local [all...] |
/5.5.2/platform/tests/crc32/ |
H A D | crc32c_test.cc | 35 typedef uint32_t (*test_function)(uint8_t* buf, size_t len); 38 uint32_t zero_32(uint8_t* buf, size_t len) { in zero_32() argument 39 assert(len == 32); in zero_32() 44 uint32_t ones_32(uint8_t* buf, size_t len) { in ones_32() argument 45 assert(len == 32); in ones_32() 50 uint32_t incrementing_32(uint8_t* buf, size_t len) { in incrementing_32() argument 51 assert(len == 32); in incrementing_32() 52 for (size_t ii = 0; ii < len; ii++) { in incrementing_32() 58 uint32_t decrementing_32(uint8_t* buf, size_t len) { in decrementing_32() argument 59 assert(len in decrementing_32() 67 iscsi_read(uint8_t* buf, size_t len) iscsi_read() argument 92 long_data(uint8_t* buf, size_t len) long_data() argument 105 short_data(uint8_t* buf, size_t len) short_data() argument 118 run_test(const uint8_t* buffer, int len, uint32_t expected, std::string name) run_test() argument 141 run_test_function(uint8_t* buffer, int len, test_function test, std::string name) run_test_function() argument [all...] |
/5.5.2/subjson/subdoc/ |
H A D | path.cc | 25 Path::convert_escaped(const char *src, size_t& len) in convert_escaped() argument 35 for (size_t ii = 0; ii < len; ii++) { in convert_escaped() 38 } else if(src[ii] == '`' && ii+1 < len && src[ii+1] == '`') { in convert_escaped() 42 len = s.size(); in convert_escaped() 48 Path::add_num_component(const char *component, size_t len) in add_num_component() argument 54 if (len != 2 || component[1] != '1') { in add_num_component() 61 for (ii = 0; ii < len; ii++) { in add_num_component() 82 Path::add_str_component(const char *component, size_t len, int n_backtick) in add_str_component() argument 85 if (len > 1 && component[0] == '`' && component[len in add_str_component() 159 parse_bracket(const char *path, size_t len, size_t *n_consumed) parse_bracket() argument 181 parse_string(const char *path, size_t len, size_t *n_consumed) parse_string() argument 244 parse(const char *path, size_t len) parse() argument [all...] |
/5.5.2/godeps/src/github.com/blevesearch/bleve/analysis/lang/fr/ |
H A D | minimal_stemmer_fr.go | 44 if len(input) < 6 { 48 if input[len(input)-1] == 'x' { 49 if input[len(input)-3] == 'a' && input[len(input)-2] == 'u' { 50 input[len(input)-2] = 'l' 52 return input[0 : len(input)-1] 55 if input[len(input)-1] == 's' { 56 input = input[0 : len(input)-1] 58 if input[len(input)-1] == 'r' { 59 input = input[0 : len(inpu [all...] |
H A D | light_stemmer_fr.go | 45 inputLen := len(input) 52 inputLen = len(input) 57 inputLen = len(input) 62 inputLen = len(input) 67 inputLen = len(input) 74 inputLen = len(input) 81 inputLen = len(input) 84 inputLen = len(input) 92 inputLen = len(input) 100 inputLen = len(inpu [all...] |
/5.5.2/godeps/src/gopkg.in/couchbase/gocbcore.v7/vendor/github.com/golang/snappy/ |
H A D | encode.go | 19 if n := MaxEncodedLen(len(src)); n < 0 { 21 } else if len(dst) < n { 26 d := binary.PutUvarint(dst, uint64(len(src))) 28 for len(src) > 0 { 31 if len(p) > maxBlockSize { 34 if len(p) < minNonLiteralBlockSize { 184 for len(p) > (cap(w.ibuf)-len(w.ibuf)) && w.err == nil { 186 if len(w.ibuf) == 0 { 191 n = copy(w.ibuf[len( [all...] |
/5.5.2/godeps/src/github.com/couchbase/gomemcached/ |
H A D | mc_req.go | 32 return HDR_LEN + len(req.Extras) + len(req.Key) + len(req.Body) + len(req.ExtMeta) 38 req.Opcode, len(req.Body), req.Key) 49 uint16(len(req.Key))) 53 data[pos] = byte(len(req.Extras)) 65 uint32(len(req.Body)+len(req.Key)+len(re [all...] |
/5.5.2/couchstore/src/views/ |
H A D | values.cc | 21 size_t len, in decode_view_btree_value() 37 cb_assert(len >= 2); in decode_view_btree_value() 40 len -= 2; in decode_view_btree_value() 43 if (len == 0) { in decode_view_btree_value() 49 length = len; in decode_view_btree_value() 52 while (len > 0) { in decode_view_btree_value() 54 cb_assert(len >= 3); in decode_view_btree_value() 57 len -= 3; in decode_view_btree_value() 59 cb_assert(len >= sz); in decode_view_btree_value() 61 len in decode_view_btree_value() 20 decode_view_btree_value(const char *bytes, size_t len, view_btree_value_t **value) decode_view_btree_value() argument 171 decode_view_id_btree_value(const char *bytes, size_t len, view_id_btree_value_t **value) decode_view_id_btree_value() argument [all...] |
/5.5.2/goproj/src/github.com/couchbase/query/value/ |
H A D | object.go | 40 if len(this) <= len(nameBuf) { 41 names = nameBuf[0:len(this)] 43 names = _NAME_POOL.GetCapped(len(this)) 45 names = names[0:len(this)] 92 if len(this) <= len(nameBuf) { 93 names = nameBuf[0:len(this)] 95 names = _NAME_POOL.GetCapped(len(this)) 97 names = names[0:len(thi [all...] |
/5.5.2/godeps/src/github.com/blevesearch/go-porterstemmer/ |
H A D | porterstemmer.go | 34 lenS := len(s) 93 lenSMinusOne := len(s) - 1 94 lenSuffixMinusOne := len(suffix) - 1 119 lenS := len(s) 136 lenS := len(s) 156 lenS := len(s) 178 lenS := len(s) 215 lenS := len(s) 219 lenSuffix := len(suffix) 231 lenSuffix := len(suffi [all...] |
/5.5.2/goproj/src/github.com/couchbase/cbgt/ |
H A D | msg_ring.go | 63 if len(oldMsg) <= MsgRingMaxSmallBufSize { 64 if len(m.SmallBufs) < MsgRingMaxBufPoolSize { 68 if len(m.LargeBufs) < MsgRingMaxBufPoolSize { 77 if len(p) <= MsgRingMaxSmallBufSize { 78 if len(m.SmallBufs) > 0 { 79 buf = m.SmallBufs[len(m.SmallBufs)-1] 80 m.SmallBufs = m.SmallBufs[0 : len(m.SmallBufs)-1] 86 for len(m.LargeBufs) > 0 && buf == nil { 87 largeBuf := m.LargeBufs[len(m.LargeBufs)-1] 88 m.LargeBufs = m.LargeBufs[0 : len( [all...] |
/5.5.2/goproj/src/github.com/couchbase/indexing/secondary/pipeline/ |
H A D | block_buffer.go | 53 len int 58 b.len = 4 65 l += len(itm) 68 itmLen := 4 + l + 4*len(itms) 69 if itmLen > b.cap-b.len { 74 binary.LittleEndian.PutUint32((*b.buf)[b.len:b.len+4], uint32(len(itm))) 75 b.len += 4 76 copy((*b.buf)[b.len [all...] |
/5.5.2/couchdb/src/couch_view_parser/yajl/ |
H A D | yajl_buf.c | 26 size_t len; member 41 buf->len = YAJL_BUF_INIT_SIZE; in yajl_buf_ensure_available() 42 buf->data = (unsigned char *) YA_MALLOC(buf->alloc, buf->len); in yajl_buf_ensure_available() 46 need = buf->len; in yajl_buf_ensure_available() 50 if (need != buf->len) { in yajl_buf_ensure_available() 52 buf->len = need; in yajl_buf_ensure_available() 71 void yajl_buf_append(yajl_buf buf, const void * data, size_t len) in yajl_buf_append() argument 73 yajl_buf_ensure_available(buf, len); in yajl_buf_append() 74 if (len > 0) { in yajl_buf_append() 76 memcpy(buf->data + buf->used, data, len); in yajl_buf_append() 99 yajl_buf_truncate(yajl_buf buf, size_t len) yajl_buf_truncate() argument [all...] |
/5.5.2/couchdb/src/ejson/yajl/ |
H A D | yajl_buf.c | 42 unsigned int len; member 57 buf->len = YAJL_BUF_INIT_SIZE; in yajl_buf_ensure_available() 58 buf->data = (unsigned char *) YA_MALLOC(buf->alloc, buf->len); in yajl_buf_ensure_available() 62 need = buf->len; in yajl_buf_ensure_available() 66 if (need != buf->len) { in yajl_buf_ensure_available() 68 buf->len = need; in yajl_buf_ensure_available() 87 void yajl_buf_append(yajl_buf buf, const void * data, unsigned int len) in yajl_buf_append() argument 89 yajl_buf_ensure_available(buf, len); in yajl_buf_append() 90 if (len > 0) { in yajl_buf_append() 92 memcpy(buf->data + buf->used, data, len); in yajl_buf_append() 115 yajl_buf_truncate(yajl_buf buf, unsigned int len) yajl_buf_truncate() argument [all...] |
/5.5.2/kv_engine/engines/ep/src/ |
H A D | blob.cc | 24 Blob* Blob::New(const char* start, const size_t len) { in New() argument 25 size_t total_len = getAllocationSize(len); in New() 26 Blob* t = new (::operator new(total_len)) Blob(start, len); in New() 30 Blob* Blob::New(const size_t len) { in New() argument 31 size_t total_len = getAllocationSize(len); in New() 32 Blob* t = new (::operator new(total_len)) Blob(len); in New() 42 Blob::Blob(const char* start, const size_t len) in Blob() argument 43 : size(static_cast<uint32_t>(len)), age(0) { in Blob() 45 std::memcpy(data, start, len); in Blob() 48 memset(data, 0, len); in Blob() 54 Blob(const size_t len) Blob() argument [all...] |
/5.5.2/goproj/src/github.com/couchbase/indexing/secondary/common/ |
H A D | metakv.go | 85 if len(path) == 0 { 89 if string(path[len(path)-1]) == "/" { 90 path = path[:len(path)-1] 98 len := len(buf) 101 for len > 0 { 104 size := len 115 len -= size 116 if len > 0 { 126 if len(pat [all...] |
/5.5.2/goproj/src/github.com/couchbase/indexing/secondary/dcp/transport/ |
H A D | mc_res.go | 28 res.Status, len(res.Key), len(res.Extras), len(res.Body)) 64 return HDR_LEN + len(res.Extras) + len(res.Key) + len(res.Body) 74 uint16(len(res.Key))) 78 data[pos] = byte(len(res.Extras)) 87 uint32(len(res.Body)+len(re [all...] |
H A D | mc_req.go | 33 return HDR_LEN + len(req.Extras) + len(req.Key) + len(req.Body) 39 req.Opcode, len(req.Body), req.Key) 50 uint16(len(req.Key))) 54 data[pos] = byte(len(req.Extras)) 63 uint32(len(req.Body)+len(req.Key)+len(req.Extras))) 76 if len(re [all...] |
/5.5.2/kv_engine/tests/testapp/ |
H A D | testapp_tests.cc | 67 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), in test_noop() local 71 safe_send(buffer.bytes, len, false); in test_noop() 87 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), in test_quit_impl() local 90 safe_send(buffer.bytes, len, false); in test_quit_impl() 119 size_t len = mcbp_storage_command(send.bytes, sizeof(send.bytes), cmd, in test_set_impl() local 126 safe_send(send.bytes, len, false); in test_set_impl() 139 safe_send(send.bytes, len, false); in test_set_impl() 166 size_t len = mcbp_storage_command(send.bytes, sizeof(send.bytes), cmd, key, in test_add_impl() local 173 safe_send(send.bytes, len, false); in test_add_impl() 190 safe_send(send.bytes, len, fals in test_add_impl() 214 size_t len = mcbp_storage_command(send.bytes, sizeof(send.bytes), cmd, test_replace_impl() local 262 size_t len = mcbp_raw_command(send.bytes, sizeof(send.bytes), cmd, test_delete_impl() local 308 size_t len; test_delete_cas_impl() local 360 size_t len = mcbp_raw_command(send.bytes, sizeof(send.bytes), cmd, test_get_impl() local 415 size_t len = mcbp_storage_command(send.bytes, sizeof(send.bytes), test_getq_impl() local 459 size_t len = mcbp_arithmetic_command(send.bytes, sizeof(send.bytes), cmd, test_incr_impl() local 495 size_t len = mcbp_arithmetic_command(send.bytes, sizeof(send.bytes), cmd, test_incr_invalid_cas_impl() local 528 size_t len = mcbp_arithmetic_command(send.bytes, sizeof(send.bytes), cmd, test_decr_impl() local 585 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 602 size_t len = mcbp_storage_command(send.bytes, sizeof(send.bytes), TEST_P() local 642 size_t len = mcbp_raw_command(send.bytes, sizeof(send.bytes), cmd, test_concat_impl() local 729 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 749 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 792 size_t len; test_pipeline_hickup_chunk() local 870 size_t len; TEST_P() local 911 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 931 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1043 size_t len = mcbp_raw_command(buffer.bytes, TEST_P() local 1067 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1088 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1111 size_t len = mcbp_raw_command(buffer.bytes, TEST_P() local 1142 size_t len = mcbp_raw_command(buffer.bytes, TEST_P() local 1171 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1194 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1217 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1239 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1262 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1280 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1318 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1339 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1358 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1380 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1403 size_t len; TEST_P() local 1495 auto len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1516 uint32_t len; get_object_w_datatype() local 1735 size_t len; TEST_P() local 1773 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1810 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local 1859 size_t len; TEST_P() local 1922 size_t len = 0; test_expiry() local 1969 const size_t len = message_size + sizeof(protocol_binary_request_set) + strlen(key); test_set_huge_impl() local 2218 ssize_t len = cb::net::send(sock_ssl, buf, sizeof(buf), 0); TEST_P() local 2289 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), get_topkeys_legacy_value() local 2368 size_t len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), get_topkeys_json_value() local 2446 size_t len; test_set_topkeys() local 2485 size_t len; test_get_topkeys() local 2521 size_t len; test_delete_topkeys() local 2574 auto len = mcbp_raw_command(buffer.bytes, sizeof(buffer.bytes), TEST_P() local [all...] |
/5.5.2/couchdb/src/couch_view_parser/ |
H A D | couch_view_parser.cc | 32 #define KEY_IS(key, len, desiredKey) \ 33 ((len == (sizeof(desiredKey) - 1)) && \ 78 static int number_callback(void *ctx, const char *number, size_t len); 79 static int string_callback(void *ctx, const unsigned char *str, size_t len); 82 static int object_key_callback(void *ctx, const unsigned char *key, size_t len); 96 static inline void add_number(ctx_t *context, parser_string_t &buffer, const char *number, size_t len); 97 static inline void add_string(ctx_t *context, parser_string_t &buffer, const unsigned char *str, size_t len); 100 static inline void add_object_key(ctx_t *context, parser_string_t &buffer, const unsigned char *key, size_t len); 218 void parseJsonChunk(ctx_t *context, unsigned char *data, size_t len) in parseJsonChunk() argument 220 yajl_status status = yajl_parse(context->handle, data, len); in parseJsonChunk() 368 number_callback(void *ctx, const char *number, size_t len) number_callback() argument 443 string_callback(void *ctx, const unsigned char *str, size_t len) string_callback() argument 658 object_key_callback(void *ctx, const unsigned char *key, size_t len) object_key_callback() argument 734 context->tmp_debug_info->from.append(reinterpret_cast<const char *>(key), len); object_key_callback() local 763 context->error->append(reinterpret_cast<const char *>(key), len); object_key_callback() local 777 context->error->append(reinterpret_cast<const char *>(key), len); object_key_callback() local 915 add_number(ctx_t *context, parser_string_t &buffer, const char *number, size_t len) add_number() argument 918 buffer.append(reinterpret_cast<const char *>(number), len); add_number() local 925 add_string(ctx_t *context, parser_string_t &buffer, const unsigned char *str, size_t len) add_string() argument 929 buffer.append(reinterpret_cast<const char *>(str), len); add_string() local 964 add_object_key(ctx_t *context, parser_string_t &buffer, const unsigned char *key, size_t len) add_object_key() argument 968 buffer.append(reinterpret_cast<const char *>(key), len); add_object_key() local 1012 size_t len = buffer.length(); maybe_expand_buffer() local [all...] |
/5.5.2/couchdb/test/bench/ |
H A D | bench_marks.js | 46 var len = timeit(function() { 51 report("Single doc inserts", NUM_DOCS/len); 56 var len = timeit(function() { 61 report("Single doc inserts with batch=ok", NUM_DOCS/len); 66 var len = timeit(function() { 71 report("Bulk docs - 100", (NUM_BATCHES*100)/len); 76 var len = timeit(function() { 81 report("Bulk docs - 1000", (NUM_BATCHES*1000)/len); 87 var len = timeit(function() { 92 report("Bulk docs - 5000", (NUM_BATCHES*5000)/len); [all...] |