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

Method test_2_3

client/hstest.cpp:259–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257}
258
259void
260hstest_thread::test_2_3(int test_num)
261{
262#if 0
263 char buf_k[128], buf_v[128];
264 unsigned int seed = arg.id;
265 op_base_t op = static_cast<op_base_t>(arg.sh.op);
266 micli_ptr hnd;
267 if (test_num == 2) {
268 hnd = micli_i::create_remote(arg.sh.conf);
269 } else if (test_num == 3) {
270 // hnd = micli_i::create_inproc(arg.sh.localdb);
271 }
272 if (hnd.get() == 0) {
273 return;
274 }
275 for (size_t i = 0; i < arg.sh.loop; ++i) {
276 for (size_t j = 0; j < arg.sh.pipe; ++j) {
277 int k = 0, v = 0, klen = 0, vlen = 0;
278 k = rand_r(&seed);
279 klen = snprintf(buf_k, sizeof(buf_k), "k%d", k);
280 v = rand_r(&seed); /* unused */
281 vlen = snprintf(buf_v, sizeof(buf_v), "v%d", v);
282 string_ref arr[2];
283 arr[0] = string_ref(buf_k, klen);
284 arr[1] = string_ref(buf_v, vlen);
285 pstrarr_ptr rec(arr, 2);
286 if (hnd->execute(op, 0, 0, rec.get_const())) {
287 ++io_success_count;
288 arg.sh.increment_count();
289 const dataset& res = hnd->get_result_ref();
290 if (res.size() == 1) {
291 ++op_success_count;
292 }
293 }
294 }
295 }
296#endif
297}
298
299void
300hstest_thread::test_4_5(int test_num)

Callers

nothing calls this directly

Calls 4

string_refClass · 0.85
increment_countMethod · 0.80
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected