From 36052ea3278abe639088429859b59195af1ed873 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 5 Oct 2017 14:09:53 +0200 Subject: switch the spec --- connect.inc | 97 ------------------------------------------------------------- 1 file changed, 97 deletions(-) delete mode 100644 connect.inc (limited to 'connect.inc') diff --git a/connect.inc b/connect.inc deleted file mode 100644 index 96d2875..0000000 --- a/connect.inc +++ /dev/null @@ -1,97 +0,0 @@ - array( - 'crc32' => array('key1_abc', 'key2_abcde'), - 'fnv' => array('key1_a', 'key2_2534534'), - ), - 'standard' => array( - 'crc32' => array('load_test_key1', 'load_test_key2'), - 'fnv' => array('key1_ab', 'key2_a'), - ), - ); - -$strat = strtolower(ini_get('memcache.hash_strategy')); -$func = strtolower(ini_get('memcache.hash_function')); -list ($balanceKey1, $balanceKey2) = $balanceKeys[$strat][$func]; - -if (!isset($udpPort)) - $udpPort = 0; -if (!isset($udpPort2)) - $udpPort2 = 0; - -$memcache = memcache_connect($host, $port); - -function test_connect1() { - global $host, $port, $udpPort; - $memcache = new MemcachePool(); - $memcache->connect($host, $port, isset($udpPort) ? $udpPort : 0); - return $memcache; -} - -function test_connect2() { - global $host2, $port2, $udpPort2; - $memcache = new MemcachePool(); - $memcache->connect($host2, $port2, isset($udpPort2) ? $udpPort2 : 0); - return $memcache; -} - -function test_connect_pool() { - global $host, $port, $udpPort, $host2, $port2, $udpPort2; - $memcache = new MemcachePool(); - $memcache->addServer($host, $port, isset($udpPort) ? $udpPort : 0); - $memcache->addServer($host2, $port2, isset($udpPort2) ? $udpPort2 : 0); - return $memcache; -} - -if (!$memcache) { - die('skip Connection to memcached failed'); -} - -?> -- cgit