summaryrefslogtreecommitdiffstats
path: root/tests/.svn/text-base/stressnast.c.svn-base
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2008-04-14 21:54:00 -0400
committerBrian Cully <github.20.shmit@spamgourmet.com>2008-04-14 21:54:00 -0400
commit79d65188b1c1578a36403c0e5756c81dcc93d816 (patch)
tree2903ed400cd0ebd13350397d402c1d9d5b9f869d /tests/.svn/text-base/stressnast.c.svn-base
parent6ba98a9f9f48e13738d9736cba9c45b5e94f42f2 (diff)
downloadnastd-79d65188b1c1578a36403c0e5756c81dcc93d816.tar.gz
nastd-79d65188b1c1578a36403c0e5756c81dcc93d816.zip
Remove svn files
Diffstat (limited to 'tests/.svn/text-base/stressnast.c.svn-base')
-rw-r--r--tests/.svn/text-base/stressnast.c.svn-base60
1 files changed, 0 insertions, 60 deletions
diff --git a/tests/.svn/text-base/stressnast.c.svn-base b/tests/.svn/text-base/stressnast.c.svn-base
deleted file mode 100644
index ad17a51..0000000
--- a/tests/.svn/text-base/stressnast.c.svn-base
+++ /dev/null
@@ -1,60 +0,0 @@
-#include <nastd.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/time.h>
-
-int
-main(int argc, char *argv[])
-{
- nasth *nasthole;
- struct timeval before, after;
- nast_options opts;
- int i, rc;
-
- if (argc != 2) {
- printf("Usage: %s query\n", argv[0]);
- return 1;
- }
-
- nasthole = nast_sphincter_new(NULL);
- if (nasthole == NULL) {
- fprintf(stderr, "ERROR: Couldn't connect to nasthole.\n");
- return 2;
- }
-
- for (;;) {
- /* Get the default options. */
- rc = nast_options_get(nasthole, &opts);
- if (rc == -1) {
- fprintf(stderr, "ERROR: Couldn't get options: %s.\n",
- nast_errmsg(nasthole));
- nast_sphincter_close(nasthole);
- return 2;
- }
-
- for (i = 0; i < 10; i++) {
- gettimeofday(&before, NULL);
- rc = nast_get(nasthole, argv[1]);
- gettimeofday(&after, NULL);
- if (rc == -1) {
- fprintf(stderr,
- "ERROR: Couldn't perform query: %s.\n",
- nast_errmsg(nasthole));
- nast_sphincter_close(nasthole);
- return 2;
- }
-
- after.tv_sec -= before.tv_sec;
- after.tv_usec -= before.tv_usec;
- if (after.tv_usec < 0) {
- after.tv_sec--;
- after.tv_usec += 1000000;
- }
- fprintf(stderr, "Request time: %2ld.%06ld seconds.\n",
- after.tv_sec, after.tv_usec);
- }
- }
- nast_sphincter_close(nasthole);
- return 0;
-}