MCPcopy Create free account
hub / github.com/DeNA/HandlerSocket-Plugin-for-MySQL / test_4_5

Method test_4_5

client/hstest.cpp:299–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299void
300hstest_thread::test_4_5(int test_num)
301{
302#if 0
303 char buf_k[128], buf_v[8192];
304 memset(buf_v, ' ', sizeof(buf_v));
305 unsigned int seed = arg.id;
306 op_base_t op = static_cast<op_base_t>(arg.sh.op);
307 micli_ptr hnd;
308 if (test_num == 4) {
309 hnd = micli_i::create_remote(arg.sh.conf);
310 } else if (test_num == 5) {
311 hnd = micli_i::create_inproc(arg.sh.localdb);
312 }
313 if (hnd.get() == 0) {
314 return;
315 }
316 for (size_t i = 0; i < arg.sh.loop; ++i) {
317 for (size_t j = 0; j < arg.sh.pipe; ++j) {
318 int k = 0, klen = 0, vlen = 0;
319 k = i & 0x0000ffffUL;
320 if (k == 0) {
321 fprintf(stderr, "k=0\n");
322 }
323 klen = snprintf(buf_k, sizeof(buf_k), "k%d", k);
324 vlen = rand_r(&seed) % 8192;
325 string_ref arr[2];
326 arr[0] = string_ref(buf_k, klen);
327 arr[1] = string_ref(buf_v, vlen);
328 pstrarr_ptr rec(arr, 2);
329 if (hnd->execute(op, 0, 0, rec.get_const())) {
330 ++io_success_count;
331 const dataset& res = hnd->get_result_ref();
332 if (res.size() == 1) {
333 ++op_success_count;
334 }
335 }
336 }
337 }
338#endif
339}
340
341void
342hstest_thread::test_6(int test_num)

Callers

nothing calls this directly

Calls 3

string_refClass · 0.85
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected