fix benchmark logic
This commit is contained in:
parent
94a80b37d5
commit
8e0f06c86b
@ -104,14 +104,19 @@ run (void *cls)
|
|||||||
const char *sndr = "payto://x-taler-bank/localhost:8080/1";
|
const char *sndr = "payto://x-taler-bank/localhost:8080/1";
|
||||||
struct TALER_Amount value;
|
struct TALER_Amount value;
|
||||||
unsigned int batch_size = batches[i];
|
unsigned int batch_size = batches[i];
|
||||||
struct GNUNET_TIME_Timestamp now;
|
struct GNUNET_TIME_Absolute now;
|
||||||
|
struct GNUNET_TIME_Timestamp ts;
|
||||||
struct GNUNET_TIME_Relative duration;
|
struct GNUNET_TIME_Relative duration;
|
||||||
struct TALER_ReservePublicKeyP reserve_pub;
|
struct TALER_ReservePublicKeyP reserve_pub;
|
||||||
|
|
||||||
GNUNET_assert (GNUNET_OK ==
|
GNUNET_assert (GNUNET_OK ==
|
||||||
TALER_string_to_amount (CURRENCY ":1.000010",
|
TALER_string_to_amount (CURRENCY ":1.000010",
|
||||||
&value));
|
&value));
|
||||||
now = GNUNET_TIME_timestamp_get ();
|
now = GNUNET_TIME_absolute_get ();
|
||||||
|
ts = GNUNET_TIME_timestamp_get ();
|
||||||
|
fprintf (stdout,
|
||||||
|
"Now: %llu\n",
|
||||||
|
now.abs_value_us);
|
||||||
plugin->start (plugin->cls,
|
plugin->start (plugin->cls,
|
||||||
"test_by_exchange_j");
|
"test_by_exchange_j");
|
||||||
for (unsigned int k = 0; k<batch_size; k++)
|
for (unsigned int k = 0; k<batch_size; k++)
|
||||||
@ -121,13 +126,13 @@ run (void *cls)
|
|||||||
plugin->reserves_in_insert (plugin->cls,
|
plugin->reserves_in_insert (plugin->cls,
|
||||||
&reserve_pub,
|
&reserve_pub,
|
||||||
&value,
|
&value,
|
||||||
now,
|
ts,
|
||||||
sndr,
|
sndr,
|
||||||
"section",
|
"section",
|
||||||
4));
|
4));
|
||||||
}
|
}
|
||||||
plugin->commit (plugin->cls);
|
plugin->commit (plugin->cls);
|
||||||
duration = GNUNET_TIME_absolute_get_duration (now.abs_time);
|
duration = GNUNET_TIME_absolute_get_duration (now);
|
||||||
fprintf (stdout,
|
fprintf (stdout,
|
||||||
"for a batchsize equal to %d it took %s\n",
|
"for a batchsize equal to %d it took %s\n",
|
||||||
batch_size,
|
batch_size,
|
||||||
|
Loading…
Reference in New Issue
Block a user