aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/benchmark/taler-exchange-benchmarkbin7584 -> 8756 bytes
-rw-r--r--src/benchmark/taler-exchange-benchmark.c30
-rw-r--r--src/exchange-lib/exchange_api_reserve.c4
-rw-r--r--src/include/taler_exchange_service.h4
4 files changed, 29 insertions, 9 deletions
diff --git a/src/benchmark/taler-exchange-benchmark b/src/benchmark/taler-exchange-benchmark
index a106ecbc5..336d9fcca 100755
--- a/src/benchmark/taler-exchange-benchmark
+++ b/src/benchmark/taler-exchange-benchmark
Binary files differ
diff --git a/src/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c
index 213a0573d..2b6608053 100644
--- a/src/benchmark/taler-exchange-benchmark.c
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -27,20 +27,40 @@
#include <gnunet/gnunet_curl_lib.h>
#include <microhttpd.h>
+
+static unsigned int pool_size = 100000;
+
/**
* URI under which the exchange is reachable during the benchmark.
*/
#define EXCHANGE_URI "http://localhost:8081/"
-/**
- * Main function for the exchange's benchmark.
+/**
+ * Main function that will be run by the scheduler.
*
- * @param argc expected to be 1
- * @param argv expected to only contain the program name
+ * @param cls closure
*/
+static void
+run (void *cls)
+{
+}
+
int
main (int argc,
char * const *argv)
{
- return GNUNET_OK;
+ /**
+ * 1 Pool's size as an option
+ * 2 Connection to the exchange
+ * 3 Allocation of large enough memory
+ * 4 Withdraw
+ */
+
+ const struct GNUNET_GETOPT_CommandLineOption options[] = {
+ {'s', "pool-size", NULL,
+ "How many coins this benchmark should instantiate", GNUNET_YES,
+ &GNUNET_GETOPT_set_uint, &pool_size}
+ };
+
+ GNUNET_SCHEDULER_run (&run, NULL);
}
diff --git a/src/exchange-lib/exchange_api_reserve.c b/src/exchange-lib/exchange_api_reserve.c
index ab8733dbb..82e602a46 100644
--- a/src/exchange-lib/exchange_api_reserve.c
+++ b/src/exchange-lib/exchange_api_reserve.c
@@ -778,9 +778,9 @@ handle_reserve_withdraw_finished (void *cls,
* @param exchange the exchange handle; the exchange must be ready to operate
* @param pk kind of coin to create
* @param reserve_priv private key of the reserve to withdraw from
- * @param coin_priv where to store the coin's private key,
+ * @param coin_priv where to fetch the coin's private key,
* caller must have committed this value to disk before the call (with @a pk)
- * @param blinding_key where to store the coin's blinding key
+ * @param blinding_key where to fetch the coin's blinding key
* caller must have committed this value to disk before the call (with @a pk)
* @param res_cb the callback to call when the final result for this request is available
* @param res_cb_cls closure for the above callback
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
index 62fc64b6f..1da42b897 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -719,9 +719,9 @@ typedef void
* @param exchange the exchange handle; the exchange must be ready to operate
* @param pk kind of coin to create
* @param reserve_priv private key of the reserve to withdraw from
- * @param coin_priv where to store the coin's private key,
+ * @param coin_priv where to fetch the coin's private key,
* caller must have committed this value to disk before the call (with @a pk)
- * @param blinding_key where to store the coin's blinding key
+ * @param blinding_key where to fetch the coin's blinding key
* caller must have committed this value to disk before the call (with @a pk)
* @param res_cb the callback to call when the final result for this request is available
* @param res_cb_cls closure for @a res_cb