summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2019-03-05 17:40:32 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2019-03-05 17:40:32 +0100
commitb8cf6ba4f6fe9290026dc121c3b6e4cd8c371368 (patch)
tree9e627cc35962bfc95c8884ae99adb1cd4325e4de /doc
parent08a762cd1509cc37f2646cffcc92de6f2506a37c (diff)
downloadmerchant-b8cf6ba4f6fe9290026dc121c3b6e4cd8c371368.tar.gz
merchant-b8cf6ba4f6fe9290026dc121c3b6e4cd8c371368.tar.bz2
merchant-b8cf6ba4f6fe9290026dc121c3b6e4cd8c371368.zip
#5257
Diffstat (limited to 'doc')
-rw-r--r--doc/manual.texi68
-rw-r--r--doc/taler-merchant-benchmark.18
2 files changed, 74 insertions, 2 deletions
diff --git a/doc/manual.texi b/doc/manual.texi
index b713855e..d43c8330 100644
--- a/doc/manual.texi
+++ b/doc/manual.texi
@@ -917,6 +917,7 @@ $ taler-merchant-dbinit -r
* Key management:: Managing the merchant's cryptographic keys
* SEPA configuration:: Configuring a SEPA bank account
* Tipping visitors:: Giving money to Web site visitors with Taler
+* Generate payments:: Generate fake payments for testing purposes
@end menu
@include configuration-format.texi
@@ -1124,6 +1125,73 @@ frontend must then forward this request to the backend. The response
generated by the backend can then be forwarded directly to the wallet.
+@node Generate payments
+@section Generate payments
+@cindex testing database
+
+The merchant codebase offers the @code{taler-merchant-benchmark} tool
+to populate the database with fake payments. This tool is in charge of
+starting a merchant, exchange, and bank processes, and provide them all
+the input to accomplish payments. Note that each component will use its
+own configuration (as they would do in production).
+
+The tool takes all of the values it needs from the command line, with
+some of them being mandatory. Among those, we have:
+
+@itemize
+@item @code{--currency=K} Use currency @emph{K}, for example to craft coins to withdraw.
+@item @code{--bank-url=URL} Assume that the bank is serving under the base URL @emph{URL}.
+This option is only actually used by the tool to check if the bank was well launched.
+@item @code{--merchant-url=URL} Reach the merchant through @emph{URL}, for downloading
+contracts and sending payments.
+@end itemize
+
+The tool then comes with two operation modes: @emph{ordinary},
+and @emph{corner}. The first just executes normal payments,
+meaning that it uses the default instance and make sure that
+all payments get aggregated. The second gives the chance to
+leave some payments unaggregated, and also to use merchant
+instances other than the default (which is, actually, the one
+used by default by the tool).
+
+Note: the abilty of driving the aggregation policy is useful
+for testing the backoffice facility.
+
+Any subcommand is also equipped with the canonical @code{--help}
+option, so feel free to issue the following command in order to
+explore all the possibilities. For example:
+
+@smallexample
+$ taler-merchant-benchmark corner --help
+@end smallexample
+
+will show all the options offered by the @emph{corner} mode.
+Among the most interesting, there are:
+
+@itemize
+@item @code{--two-coins=TC} This option instructs the tool to perform @emph{TC}
+many payments that use two coins, because normally only one coin is spent per payment.
+@item @code{--unaggregated-number=UN} This option instructs the tool to perform @emph{UN}
+(one coin) payments that will be left unaggregated.
+@item @code{--alt-instance=AI} This option instructs the tool to perform payments
+using the merchant instance @emph{AI} (instead of the @emph{default} instance)
+@item
+@end itemize
+
+As for the @code{ordinary} subcommand, it is worth explaining the
+following options:
+
+@itemize
+@item @code{--payments-number=PN} Instructs the tool to perform @emph{PN} payments.
+@item @code{--tracks-number=TN} Instructs the tool to perform @emph{TN} tracking operations.
+Note that the @b{total} amount of operations will be two times @emph{TN}, since "one"
+tracking operation accounts for @code{/track/transaction} and @code{/track/transfer}.
+This command should only be used to see if the operation ends without problems, as
+no actual measurement of performance is provided (despite of the 'benchmark' work used
+in the tool's name).
+
+@end itemize
+
@c **********************************************************
@c ******************* Appendices *************************
@c **********************************************************
diff --git a/doc/taler-merchant-benchmark.1 b/doc/taler-merchant-benchmark.1
index acf8a6d6..2dc3057a 100644
--- a/doc/taler-merchant-benchmark.1
+++ b/doc/taler-merchant-benchmark.1
@@ -48,12 +48,16 @@ those unaggregated payments and actually aggregated them.
.SH COMMON OPTIONS
.B
+.IP "\-k K, \-\-currency=K"
+Use currency K, mandatory.
+
+.B
.IP "\-m URL, \-\-merchant\-url=URL"
-Use URL as the merchant base URL during the benchmark. The URL is mainly used to download and pay for contracts.
+Use URL as the merchant base URL during the benchmark. The URL is mainly used to download and pay for contracts. Mandatory.
.B
.IP "\-b URL, \-\-bank\-url=URL"
-Use URL as the bank's base URL during the benchmark. The URL is used to test whether the bank is up and running.
+Use URL as the bank's base URL during the benchmark. The URL is used to test whether the bank is up and running. Mandatory.
.B
.IP "\-c FILENAME, \-\-config=FILENAME"