summaryrefslogtreecommitdiff
path: root/src/benchmark
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2016-05-30 17:16:01 +0200
committerMarcello Stanisci <marcello.stanisci@inria.fr>2016-05-30 17:16:01 +0200
commit925097c86df2707a381d10c75445f57110b47d83 (patch)
treeabeb020fdb1e3939b8d4c5a83116355dec957158 /src/benchmark
parent848c7f0e4fe3adde77e1cb1e1b4677dd5ef2ca0e (diff)
downloadexchange-925097c86df2707a381d10c75445f57110b47d83.tar.gz
exchange-925097c86df2707a381d10c75445f57110b47d83.tar.bz2
exchange-925097c86df2707a381d10c75445f57110b47d83.zip
adding --pool-size option to benchmark,
correcting comments
Diffstat (limited to 'src/benchmark')
-rwxr-xr-xsrc/benchmark/taler-exchange-benchmarkbin7584 -> 8756 bytes
-rw-r--r--src/benchmark/taler-exchange-benchmark.c30
2 files changed, 25 insertions, 5 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);
}