summaryrefslogtreecommitdiff
path: root/src/benchmark
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-07-25 16:18:49 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-07-25 16:18:49 +0200
commit6eaa415f904cfe74fe44db8a41ea8d115cbebed1 (patch)
treea21629ac0f438ef222bb4c66b5246526c0b7c7ce /src/benchmark
parenta7a34f68e1e08051c0be6aa36f717f4c285ae9e2 (diff)
downloadexchange-6eaa415f904cfe74fe44db8a41ea8d115cbebed1.tar.gz
exchange-6eaa415f904cfe74fe44db8a41ea8d115cbebed1.tar.bz2
exchange-6eaa415f904cfe74fe44db8a41ea8d115cbebed1.zip
Benchmark.
Building the /wire response object inside the tool.
Diffstat (limited to 'src/benchmark')
-rw-r--r--src/benchmark/taler-exchange-benchmark.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c
index bfeb6f72f..96a9a7485 100644
--- a/src/benchmark/taler-exchange-benchmark.c
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -320,6 +320,7 @@ int
main (int argc,
char *const *argv)
{
+ struct GNUNET_OS_Process *compute_wire_response;
struct GNUNET_CONFIGURATION_Handle *cfg;
struct GNUNET_GETOPT_CommandLineOption options[] = {
@@ -408,9 +409,30 @@ main (int argc,
return MISSING_BANK_URL;
}
- GNUNET_assert (GNUNET_OK == TALER_TESTING_prepare_exchange
- (cfg_filename,
- &exchange_url)); // never used, we do all via handle.
+ compute_wire_response = GNUNET_OS_start_process
+ (GNUNET_NO,
+ GNUNET_OS_INHERIT_STD_ALL,
+ NULL, NULL, NULL,
+ "taler-exchange-wire",
+ "taler-exchange-wire",
+ "-c", cfg_filename,
+ NULL);
+ if (NULL == compute_wire_response)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to run `taler-exchange-wire`,"
+ " is your PATH correct?\n");
+ return GNUNET_NO;
+ }
+ GNUNET_OS_process_wait
+ (compute_wire_response);
+ GNUNET_OS_process_destroy
+ (compute_wire_response);
+
+ GNUNET_assert
+ (GNUNET_OK == TALER_TESTING_prepare_exchange
+ (cfg_filename,
+ &exchange_url)); // never used, we do all via handle.
result = TALER_TESTING_setup_with_exchange
(run,
NULL,