summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2016-05-30 15:08:12 +0200
committerMarcello Stanisci <marcello.stanisci@inria.fr>2016-05-30 15:08:12 +0200
commit848c7f0e4fe3adde77e1cb1e1b4677dd5ef2ca0e (patch)
treecae411b2c233a535027120f874f5ec4f88948944
parent1982fdd81cb7284c883dd810aef2827c19a54209 (diff)
downloadexchange-848c7f0e4fe3adde77e1cb1e1b4677dd5ef2ca0e.tar.gz
exchange-848c7f0e4fe3adde77e1cb1e1b4677dd5ef2ca0e.tar.bz2
exchange-848c7f0e4fe3adde77e1cb1e1b4677dd5ef2ca0e.zip
benchmark makefile
-rw-r--r--configure.ac1
-rw-r--r--src/Makefile.am2
-rw-r--r--src/benchmark/Makefile.am22
-rwxr-xr-xsrc/benchmark/taler-exchange-benchmarkbin0 -> 7584 bytes
-rw-r--r--src/benchmark/taler-exchange-benchmark.c46
5 files changed, 70 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 939e8f7c0..ee3720821 100644
--- a/configure.ac
+++ b/configure.ac
@@ -452,6 +452,7 @@ AC_CONFIG_FILES([Makefile
src/exchange/Makefile
src/exchange-tools/Makefile
src/exchange-lib/Makefile
+ src/benchmark/Makefile
src/include/Makefile
src/json/Makefile
src/pq/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 74956a6ab..a1db78b48 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,7 +22,7 @@ pkgcfg_DATA = \
EXTRA_DIST = \
taler.conf
-SUBDIRS = include util json $(PQ_DIR) $(BANK_LIB) wire exchangedb exchange exchange-tools
+SUBDIRS = include util json $(PQ_DIR) $(BANK_LIB) wire exchangedb exchange exchange-tools benchmark
if HAVE_LIBCURL
SUBDIRS += exchange-lib
else
diff --git a/src/benchmark/Makefile.am b/src/benchmark/Makefile.am
new file mode 100644
index 000000000..4deb81723
--- /dev/null
+++ b/src/benchmark/Makefile.am
@@ -0,0 +1,22 @@
+# This Makefile.am is in the public domain
+AM_CPPFLAGS = -I$(top_srcdir)/src/include
+
+if USE_COVERAGE
+ AM_CFLAGS = --coverage -O0
+ XLIB = -lgcov
+endif
+
+bin_PROGRAMS = \
+ taler-exchange-benchmark
+
+taler_exchange_benchmark_SOURCES = \
+ taler-exchange-benchmark.c
+taler_exchange_benchmark_LDADD = \
+ $(LIBGCRYPT_LIBS) \
+ -ltalerexchange \
+ -ltalerjson \
+ -ltalerutil \
+ -lgnunetjson \
+ -lgnunetcurl \
+ -lgnunetutil \
+ -ljansson
diff --git a/src/benchmark/taler-exchange-benchmark b/src/benchmark/taler-exchange-benchmark
new file mode 100755
index 000000000..a106ecbc5
--- /dev/null
+++ 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
new file mode 100644
index 000000000..213a0573d
--- /dev/null
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -0,0 +1,46 @@
+/*
+ This file is part of TALER
+ Copyright (C) 2014, 2015, 2016 GNUnet e.V. and INRIA
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU Lesser General Public License as published by the Free Software
+ Foundation; either version 2.1, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License along with
+ TALER; see the file COPYING.LGPL. If not, If not, see <http://www.gnu.org/licenses/>
+*/
+/**
+ * @file src/benchmark/taler-exchange-benchmark.c
+ * @brief exchange's benchmark
+ * @author Marcello Stanisci
+ */
+#include "platform.h"
+#include <taler/taler_util.h>
+#include <taler/taler_signatures.h>
+#include <taler/taler_exchange_service.h>
+#include <taler/taler_json_lib.h>
+#include <gnunet/gnunet_util_lib.h>
+#include <gnunet/gnunet_curl_lib.h>
+#include <microhttpd.h>
+
+/**
+ * URI under which the exchange is reachable during the benchmark.
+ */
+#define EXCHANGE_URI "http://localhost:8081/"
+/**
+
+ * Main function for the exchange's benchmark.
+ *
+ * @param argc expected to be 1
+ * @param argv expected to only contain the program name
+ */
+int
+main (int argc,
+ char * const *argv)
+{
+ return GNUNET_OK;
+}