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

Function main

lib_acl_cpp/samples/memcache_pool/main.cpp:140–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140int main(int argc, char* argv[])
141{
142 int ch, cocurrent = 10;
143 string addr("127.0.0.1:11211");
144 string key;
145
146 // ��ʼ�� acl ��
147 acl::acl_cpp_init();
148
149 while ((ch = getopt(argc, argv, "hs:n:c:k:a:")) > 0)
150 {
151 switch (ch)
152 {
153 case 'h':
154 usage(argv[0]);
155 return 0;
156 case 's':
157 addr = optarg;
158 break;
159 case 'c':
160 cocurrent = atoi(optarg);
161 break;
162 case 'n':
163 __loop_count = atoi(optarg);
164 break;
165 case 'k':
166 key = optarg;
167 break;
168 case 'a':
169 __action = optarg;
170 break;
171 default:
172 usage(argv[0]);
173 return 0;
174 }
175 }
176
177 if (key.empty())
178 {
179 usage(argv[0]);
180 return 0;
181 }
182
183 init(addr, cocurrent);
184 run(cocurrent, key.c_str());
185 end();
186
187#ifdef WIN32
188 printf("enter any key to exit...\r\n");
189 getchar();
190#endif
191
192 return 0;
193}

Callers

nothing calls this directly

Calls 8

acl_cpp_initFunction · 0.85
usageFunction · 0.70
initFunction · 0.70
runFunction · 0.70
endFunction · 0.70
getoptFunction · 0.50
emptyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…