| 1696 | } |
| 1697 | |
| 1698 | int main(int argc, const char **argv) { |
| 1699 | int i; |
| 1700 | char *data, *cmd; |
| 1701 | const char *tag; |
| 1702 | int len; |
| 1703 | |
| 1704 | client c; |
| 1705 | aeThreadOnline(); |
| 1706 | storage_init(NULL, 0); |
| 1707 | |
| 1708 | srandom(time(NULL) ^ getpid()); |
| 1709 | init_genrand64(ustime() ^ getpid()); |
| 1710 | signal(SIGHUP, SIG_IGN); |
| 1711 | signal(SIGPIPE, SIG_IGN); |
| 1712 | |
| 1713 | memset(&config.sslconfig, 0, sizeof(config.sslconfig)); |
| 1714 | config.numclients = 50; |
| 1715 | config.requests = 100000; |
| 1716 | config.liveclients = 0; |
| 1717 | config.el = aeCreateEventLoop(1024*10); |
| 1718 | aeCreateTimeEvent(config.el,1,showThroughput,NULL,NULL); |
| 1719 | config.keepalive = 1; |
| 1720 | config.datasize = 3; |
| 1721 | config.pipeline = 1; |
| 1722 | config.randomkeys = 0; |
| 1723 | config.randomkeys_keyspacelen = 0; |
| 1724 | config.quiet = 0; |
| 1725 | config.csv = 0; |
| 1726 | config.loop = 0; |
| 1727 | config.idlemode = 0; |
| 1728 | config.clients = listCreate(); |
| 1729 | config.hostip = "127.0.0.1"; |
| 1730 | config.hostport = 6379; |
| 1731 | config.hostsocket = NULL; |
| 1732 | config.tests = NULL; |
| 1733 | config.dbnum = 0; |
| 1734 | config.auth = NULL; |
| 1735 | config.precision = DEFAULT_LATENCY_PRECISION; |
| 1736 | config.num_threads = 0; |
| 1737 | config.threads = NULL; |
| 1738 | config.cluster_mode = 0; |
| 1739 | config.cluster_node_count = 0; |
| 1740 | config.cluster_nodes = NULL; |
| 1741 | config.redis_config = NULL; |
| 1742 | config.is_fetching_slots = 0; |
| 1743 | config.is_updating_slots = 0; |
| 1744 | config.slots_last_update = 0; |
| 1745 | config.enable_tracking = 0; |
| 1746 | |
| 1747 | i = parseOptions(argc,argv); |
| 1748 | argc -= i; |
| 1749 | argv += i; |
| 1750 | |
| 1751 | tag = ""; |
| 1752 | |
| 1753 | #ifdef USE_OPENSSL |
| 1754 | if (config.tls) { |
| 1755 | cliSecureInit(); |
nothing calls this directly
no test coverage detected