aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/daemontest_urlparse.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-09-29 15:04:50 +0000
committerChristian Grothoff <christian@grothoff.org>2011-09-29 15:04:50 +0000
commitfe7ed03a632fb960bef5b5ba5ea23b07c8c2d397 (patch)
treee8fac5e108b15eeedaa2996d2736dada7478bde8 /src/testcurl/daemontest_urlparse.c
parentb6f6b9a5cc5d2459efd18cd206e79ffa976d5a3d (diff)
downloadlibmicrohttpd-fe7ed03a632fb960bef5b5ba5ea23b07c8c2d397.tar.gz
libmicrohttpd-fe7ed03a632fb960bef5b5ba5ea23b07c8c2d397.zip
use 127.0.0.1 instead of localhost for testcurl/*.c;
performs far better on OS X and Solaris-style kernels Will Bryant (<will.bryant@gmail.com>) writes: On 21/09/2011, at 20:14 , Christian Grothoff wrote: > > On the OpenIndiana performance, do you have something like 'strace' where you > > could monitor what's going on? Most likely the code hangs blocking in some > > syscall for longer than it should... It has truss, and for the record, it showed no slow calls. The problem turned out to be the tests using "localhost", which was picking the primary interface for the box, not the loopback interface. Changing perf_get_concurrent.c to use 127.0.0.1 makes it vastly faster - it went from ~35 requests/sec to 12,000-15,000 requests/sec. It makes a big difference on OS X too - from 115-140 requests/sec on my old macbook to 600-3600 requests/sec (variation here mainly due to the large amount of other stuff I have running). Patch attached.
Diffstat (limited to 'src/testcurl/daemontest_urlparse.c')
-rw-r--r--src/testcurl/daemontest_urlparse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testcurl/daemontest_urlparse.c b/src/testcurl/daemontest_urlparse.c
index 9e0c9d30..39812324 100644
--- a/src/testcurl/daemontest_urlparse.c
+++ b/src/testcurl/daemontest_urlparse.c
@@ -136,7 +136,7 @@ testInternalGet (int poll_flag)
136 if (d == NULL) 136 if (d == NULL)
137 return 1; 137 return 1;
138 c = curl_easy_init (); 138 c = curl_easy_init ();
139 curl_easy_setopt (c, CURLOPT_URL, "http://localhost:11080/hello_world?a=b&c=&d"); 139 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11080/hello_world?a=b&c=&d");
140 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 140 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
141 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 141 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
142 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 142 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);