diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-07-17 20:08:15 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-07-17 20:08:15 +0000 |
commit | e452c722e830617352fed1ee003248ce00c108f4 (patch) | |
tree | 3359ab3844ceae623419f890bebcd2d00d932fd4 /src/datastore/perf_plugin_datastore.c | |
parent | c51f6c8caf68ed993eb70c58e52d47ca231a594a (diff) | |
download | gnunet-e452c722e830617352fed1ee003248ce00c108f4.tar.gz gnunet-e452c722e830617352fed1ee003248ce00c108f4.zip |
fixes
Diffstat (limited to 'src/datastore/perf_plugin_datastore.c')
-rw-r--r-- | src/datastore/perf_plugin_datastore.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c index 7f6b7fee0..54f1eb90c 100644 --- a/src/datastore/perf_plugin_datastore.c +++ b/src/datastore/perf_plugin_datastore.c | |||
@@ -67,7 +67,7 @@ enum RunPhase | |||
67 | 67 | ||
68 | struct CpsRunContext | 68 | struct CpsRunContext |
69 | { | 69 | { |
70 | int i; | 70 | unsigned int i; |
71 | struct GNUNET_TIME_Absolute start; | 71 | struct GNUNET_TIME_Absolute start; |
72 | struct GNUNET_TIME_Absolute end; | 72 | struct GNUNET_TIME_Absolute end; |
73 | struct GNUNET_SCHEDULER_Handle *sched; | 73 | struct GNUNET_SCHEDULER_Handle *sched; |
@@ -126,6 +126,10 @@ putValue (struct GNUNET_DATASTORE_PluginFunctions * api, int i, int k) | |||
126 | stored_entries++; | 126 | stored_entries++; |
127 | } | 127 | } |
128 | 128 | ||
129 | static void | ||
130 | test (void *cls, | ||
131 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
132 | |||
129 | 133 | ||
130 | static int | 134 | static int |
131 | iterateDummy (void *cls, | 135 | iterateDummy (void *cls, |
@@ -146,6 +150,7 @@ iterateDummy (void *cls, | |||
146 | { | 150 | { |
147 | crc->end = GNUNET_TIME_absolute_get(); | 151 | crc->end = GNUNET_TIME_absolute_get(); |
148 | printf (crc->msg, | 152 | printf (crc->msg, |
153 | crc->i, | ||
149 | (unsigned long long) (crc->end.value - crc->start.value)); | 154 | (unsigned long long) (crc->end.value - crc->start.value)); |
150 | if (crc->phase != RP_AN_GET) | 155 | if (crc->phase != RP_AN_GET) |
151 | { | 156 | { |
@@ -158,6 +163,11 @@ iterateDummy (void *cls, | |||
158 | else | 163 | else |
159 | crc->phase = RP_PUT; | 164 | crc->phase = RP_PUT; |
160 | } | 165 | } |
166 | GNUNET_SCHEDULER_add_after (crc->sched, | ||
167 | GNUNET_NO, | ||
168 | GNUNET_SCHEDULER_PRIORITY_KEEP, | ||
169 | GNUNET_SCHEDULER_NO_PREREQUISITE_TASK, | ||
170 | &test, crc); | ||
161 | return GNUNET_OK; | 171 | return GNUNET_OK; |
162 | } | 172 | } |
163 | crc->api->next_request (next_cls, | 173 | crc->api->next_request (next_cls, |
@@ -165,6 +175,7 @@ iterateDummy (void *cls, | |||
165 | return GNUNET_OK; | 175 | return GNUNET_OK; |
166 | } | 176 | } |
167 | 177 | ||
178 | |||
168 | static void | 179 | static void |
169 | test (void *cls, | 180 | test (void *cls, |
170 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 181 | const struct GNUNET_SCHEDULER_TaskContext *tc) |