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

Method test_8

client/hstest.cpp:469–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467};
468
469void
470hstest_thread::test_8(int test_num)
471{
472#if 0
473 char buf_k[128], buf_v[128];
474 unsigned int seed = arg.id;
475 // op_base_t op = static_cast<op_base_t>(arg.sh.op);
476 using namespace boost::multi_index;
477 typedef member<rec, std::string, &rec::key> rec_get_key;
478 typedef ordered_unique<rec_get_key> oui;
479 typedef multi_index_container< rec, indexed_by<oui> > mic;
480 #if 0
481 typedef std::map<std::string, std::string> m_type;
482 m_type m;
483 #endif
484 mic m;
485 for (size_t i = 0; i < arg.sh.loop; ++i) {
486 for (size_t j = 0; j < arg.sh.pipe; ++j) {
487 int k = 0, v = 0, klen = 0, vlen = 0;
488 k = rand_r(&seed);
489 klen = snprintf(buf_k, sizeof(buf_k), "k%d", k);
490 v = rand_r(&seed); /* unused */
491 vlen = snprintf(buf_v, sizeof(buf_v), "v%d", v);
492 const std::string ks(buf_k, klen);
493 const std::string vs(buf_v, vlen);
494 rec r;
495 r.key = ks;
496 r.value = vs;
497 m.insert(r);
498 // m.insert(std::make_pair(ks, vs));
499 ++io_success_count;
500 ++op_success_count;
501 arg.sh.increment_count();
502 }
503 }
504#endif
505}
506
507struct mysqltest_thread_initobj : private noncopyable {
508 mysqltest_thread_initobj() {

Callers

nothing calls this directly

Calls 1

increment_countMethod · 0.80

Tested by

no test coverage detected