MCPcopy Create free account
hub / github.com/acl-dev/acl / test_redis_session

Function test_redis_session

lib_acl_cpp/samples/session/redis_session.cpp:91–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89};
90
91bool test_redis_session(const char* addr, int n, int max_threads)
92{
93 int conn_timeout = 10, rw_timeout = 10;
94 acl::redis_client_cluster cluster;
95 cluster.set(addr, max_threads, conn_timeout, rw_timeout);
96
97 std::vector<test_thread*> threads;
98 for (int i = 0; i < max_threads; i++)
99 {
100 test_thread* thread = new test_thread(cluster, max_threads, n);
101 threads.push_back(thread);
102 thread->set_detachable(false);
103 thread->start();
104 }
105
106 for (std::vector<test_thread*>::iterator it = threads.begin();
107 it != threads.end(); ++it)
108 {
109 (*it)->wait();
110 delete (*it);
111 }
112
113 return true;
114}
115
116void test_session_string(const char* addr)
117{

Callers 1

mainFunction · 0.85

Calls 6

beginMethod · 0.80
setMethod · 0.45
push_backMethod · 0.45
startMethod · 0.45
endMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…