diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-02-27 02:04:31 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-02-27 02:04:31 +0000 |
commit | 88f684b25d456577c23c73767e293c78a4ea04d9 (patch) | |
tree | 766159d267aa41e46bfb0bbfcd1ce2a87298a83e | |
parent | 7833be041992f83a89e6ab7fa4e1c466c7d787c9 (diff) | |
download | gnunet-88f684b25d456577c23c73767e293c78a4ea04d9.tar.gz gnunet-88f684b25d456577c23c73767e293c78a4ea04d9.zip |
- fix off-by-one, imporve log
-rw-r--r-- | src/regex/gnunet-regex-profiler.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c index 1d3b030be..bfe84f8d4 100644 --- a/src/regex/gnunet-regex-profiler.c +++ b/src/regex/gnunet-regex-profiler.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include "gnunet_testbed_service.h" | 37 | #include "gnunet_testbed_service.h" |
38 | 38 | ||
39 | #define FIND_TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 90) | 39 | #define FIND_TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 90) |
40 | #define SEARCHES_IN_PARALLEL 10 | 40 | #define SEARCHES_IN_PARALLEL 2 |
41 | 41 | ||
42 | /** | 42 | /** |
43 | * DLL of operations | 43 | * DLL of operations |
@@ -974,7 +974,7 @@ static void | |||
974 | find_next_string (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 974 | find_next_string (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
975 | { | 975 | { |
976 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) || | 976 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) || |
977 | peer_cnt >= (num_search_strings - 1)) | 977 | peer_cnt >= num_search_strings) |
978 | return; | 978 | return; |
979 | 979 | ||
980 | parallel_searches++; | 980 | parallel_searches++; |
@@ -1647,14 +1647,12 @@ controller_event_cb (void *cls, | |||
1647 | { | 1647 | { |
1648 | fflush (stdout); | 1648 | fflush (stdout); |
1649 | prof_time = GNUNET_TIME_absolute_get_duration (prof_start_time); | 1649 | prof_time = GNUNET_TIME_absolute_get_duration (prof_start_time); |
1650 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 1650 | printf ("\n%u links established in %s\n", |
1651 | "%u links established in %s\n", | 1651 | num_links, |
1652 | num_links, | 1652 | GNUNET_STRINGS_relative_time_to_string (prof_time, GNUNET_NO)); |
1653 | GNUNET_STRINGS_relative_time_to_string (prof_time, GNUNET_NO)); | ||
1654 | prof_time = GNUNET_TIME_relative_divide(prof_time, num_links); | 1653 | prof_time = GNUNET_TIME_relative_divide(prof_time, num_links); |
1655 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 1654 | printf ("Average of %s per connection\n", |
1656 | "Average of %s per connection\n", | 1655 | GNUNET_STRINGS_relative_time_to_string (prof_time, GNUNET_NO)); |
1657 | GNUNET_STRINGS_relative_time_to_string (prof_time, GNUNET_NO)); | ||
1658 | result = GNUNET_OK; | 1656 | result = GNUNET_OK; |
1659 | GNUNET_free (peer_handles); | 1657 | GNUNET_free (peer_handles); |
1660 | 1658 | ||