aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-06-11 09:15:37 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-06-11 09:15:37 +0000
commit82192cd2ab03977cf175507372e0f8cd12d1db7d (patch)
treefed20812f62450427ee40168d268fda70019ee75
parent464bc25469fa8c415d0a852ca374da3593bc94a6 (diff)
downloadgnunet-82192cd2ab03977cf175507372e0f8cd12d1db7d.tar.gz
gnunet-82192cd2ab03977cf175507372e0f8cd12d1db7d.zip
renaming to perf test
-rw-r--r--src/peerstore/Makefile.am10
-rw-r--r--src/peerstore/perf_peerstore_store.c (renamed from src/peerstore/test_peerstore_stress_store.c)14
2 files changed, 11 insertions, 13 deletions
diff --git a/src/peerstore/Makefile.am b/src/peerstore/Makefile.am
index 1defd0c72..4c5e4af8c 100644
--- a/src/peerstore/Makefile.am
+++ b/src/peerstore/Makefile.am
@@ -68,8 +68,8 @@ check_PROGRAMS = \
68 test_peerstore_api_store \ 68 test_peerstore_api_store \
69 test_peerstore_api_iterate \ 69 test_peerstore_api_iterate \
70 test_peerstore_api_watch \ 70 test_peerstore_api_watch \
71 test_peerstore_stress_store 71 perf_peerstore_store
72 72
73if ENABLE_TEST_RUN 73if ENABLE_TEST_RUN
74AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH; 74AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
75TESTS = $(check_PROGRAMS) 75TESTS = $(check_PROGRAMS)
@@ -96,9 +96,9 @@ test_peerstore_api_watch_LDADD = \
96 $(top_builddir)/src/testing/libgnunettesting.la \ 96 $(top_builddir)/src/testing/libgnunettesting.la \
97 $(top_builddir)/src/util/libgnunetutil.la 97 $(top_builddir)/src/util/libgnunetutil.la
98 98
99test_peerstore_stress_store_SOURCES = \ 99perf_peerstore_store_SOURCES = \
100 test_peerstore_stress_store.c 100 perf_peerstore_store.c
101test_peerstore_stress_store_LDADD = \ 101perf_peerstore_store_LDADD = \
102 $(top_builddir)/src/peerstore/libgnunetpeerstore.la \ 102 $(top_builddir)/src/peerstore/libgnunetpeerstore.la \
103 $(top_builddir)/src/testing/libgnunettesting.la \ 103 $(top_builddir)/src/testing/libgnunettesting.la \
104 $(top_builddir)/src/util/libgnunetutil.la 104 $(top_builddir)/src/util/libgnunetutil.la
diff --git a/src/peerstore/test_peerstore_stress_store.c b/src/peerstore/perf_peerstore_store.c
index c5113c74b..4f5366225 100644
--- a/src/peerstore/test_peerstore_stress_store.c
+++ b/src/peerstore/perf_peerstore_store.c
@@ -18,8 +18,8 @@
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20/** 20/**
21 * @file peerstore/test_peerstore_stress_store.c 21 * @file peerstore/perf_peerstore_store.c
22 * @brief stress test for peerstore store operation 22 * @brief performance test for peerstore store operation
23 */ 23 */
24#include "platform.h" 24#include "platform.h"
25#include "gnunet_util_lib.h" 25#include "gnunet_util_lib.h"
@@ -100,21 +100,19 @@ int
100main (int argc, char *argv[]) 100main (int argc, char *argv[])
101{ 101{
102 struct GNUNET_TIME_Absolute start; 102 struct GNUNET_TIME_Absolute start;
103 struct GNUNET_TIME_Absolute end;
104 struct GNUNET_TIME_Relative diff; 103 struct GNUNET_TIME_Relative diff;
105 104
106 start = GNUNET_TIME_absolute_get(); 105 start = GNUNET_TIME_absolute_get();
107 if (0 != GNUNET_TESTING_service_run ("test-gnunet-peerstore", 106 if (0 != GNUNET_TESTING_service_run ("perf-peerstore-store",
108 "peerstore", 107 "peerstore",
109 "test_peerstore_api_data.conf", 108 "test_peerstore_api_data.conf",
110 &run, NULL)) 109 &run, NULL))
111 return 1; 110 return 1;
112 end = GNUNET_TIME_absolute_get(); 111 diff = GNUNET_TIME_absolute_get_duration(start);
113 diff = GNUNET_TIME_absolute_get_difference(start, end); 112 fprintf(stderr, "Stored and retrieved %d records in %s (%s).\n",
114 printf("Stored and retrieved %d records in %s (%s).\n",
115 STORES, GNUNET_STRINGS_relative_time_to_string(diff, GNUNET_YES), 113 STORES, GNUNET_STRINGS_relative_time_to_string(diff, GNUNET_YES),
116 GNUNET_STRINGS_relative_time_to_string(diff, GNUNET_NO)); 114 GNUNET_STRINGS_relative_time_to_string(diff, GNUNET_NO));
117 return ok; 115 return ok;
118} 116}
119 117
120/* end of test_peerstore_stress.c */ 118/* end of perf_peerstore_store.c */