From 7dfd634b17df4e1505c62f2224380a0d38da2e8d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 17 Nov 2011 19:18:52 +0000 Subject: add units to time, use configuration time api where appropriate, fixing Mantis #1875 --- src/nse/gnunet-nse-profiler.c | 7 ++----- src/nse/nse.conf | 6 +++--- src/nse/nse_profiler_test.conf | 10 +++++----- src/nse/test_nse.conf | 8 ++++---- 4 files changed, 14 insertions(+), 17 deletions(-) (limited to 'src/nse') diff --git a/src/nse/gnunet-nse-profiler.c b/src/nse/gnunet-nse-profiler.c index 4ad689be9..d097b96aa 100644 --- a/src/nse/gnunet-nse-profiler.c +++ b/src/nse/gnunet-nse-profiler.c @@ -557,8 +557,8 @@ run (void *cls, char *const *args, const char *cfgfile, } if (GNUNET_OK != - GNUNET_CONFIGURATION_get_value_number (testing_cfg, "nse-profiler", - "wait_time", &temp_wait)) + GNUNET_CONFIGURATION_get_value_time (testing_cfg, "nse-profiler", + "WAIT_TIME", &wait_time)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Option nse-profiler:wait_time is required!\n"); @@ -611,9 +611,6 @@ run (void *cls, char *const *args, const char *cfgfile, } - wait_time = - GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_wait); - if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (cfg, "nse-profiler", "output_file", &temp_str)) diff --git a/src/nse/nse.conf b/src/nse/nse.conf index 318fd15fd..5a7835e82 100644 --- a/src/nse/nse.conf +++ b/src/nse/nse.conf @@ -14,11 +14,11 @@ PROOFFILE = $SERVICEHOME/.nse-proof HISTOGRAM = $SERVICEHOME/nse-history.log # How 'slowly' should the proof-of-work be constructed (delay -# between rounds in ms); sane values between 0 and ~1000. -WORKDELAY = 5 +# between rounds); sane values between 0 and ~1000. +WORKDELAY = 5 ms # Note: changing any of the values below will make this peer # completely incompatible with other peers! -INTERVAL = 3600000 +INTERVAL = 1 h WORKBITS = 20 diff --git a/src/nse/nse_profiler_test.conf b/src/nse/nse_profiler_test.conf index 411bad9f0..c0f584ce4 100644 --- a/src/nse/nse_profiler_test.conf +++ b/src/nse/nse_profiler_test.conf @@ -13,8 +13,8 @@ DEBUG = NO CONFIG = $DEFAULTCONFIG # Overriding network settings for faster testing (do NOT use # these values in production just because they are here) -WORKDELAY = 10000 -INTERVAL = 15000 +WORKDELAY = 10 s +INTERVAL = 15 s WORKBITS = 0 PROOFFILE = $SERVICEHOME/nse.proof @@ -80,13 +80,13 @@ CONNECT_TOPOLOGY = SMALL_WORLD_RING PERCENTAGE = 3 #PROBABILITY = .1 F2F = NO -CONNECT_TIMEOUT = 60 +CONNECT_TIMEOUT = 60 s CONNECT_ATTEMPTS = 3 #DEBUG = YES HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat MAX_CONCURRENT_SSH = 20 USE_PROGRESSBARS = YES -PEERGROUP_TIMEOUT = 1000 +PEERGROUP_TIMEOUT = 1000 s TOPOLOGY_OUTPUT_FILE = nse_topo_1000_peers_initial MAX_OUTSTANDING_CONNECTIONS = 200 #SINGLE_PEERINFO_PER_HOST = YES @@ -105,5 +105,5 @@ TOPOLOGY_OUTPUT_FILE = nse_topo_100_peers #ROUND3 = 100 #ROUND2 = 500 #ROUND3 = 1000 -WAIT_TIME = 120 +WAIT_TIME = 120 s CONNECTION_LIMIT = 10 diff --git a/src/nse/test_nse.conf b/src/nse/test_nse.conf index ba33f7fc5..48944c119 100644 --- a/src/nse/test_nse.conf +++ b/src/nse/test_nse.conf @@ -14,8 +14,8 @@ CONFIG = $DEFAULTCONFIG PROOFFILE = $SERVICEHOME/proof.nse # Overriding network settings for faster testing (do NOT use # these values in production just because they are here) -WORKDELAY = 1 -INTERVAL = 60000 +WORKDELAY = 1 ms +INTERVAL = 60 s WORKBITS = 1 HISTOGRAM = $SERVICEHOME/nse-histogram @@ -64,13 +64,13 @@ TOPOLOGY = NONE CONNECT_TOPOLOGY = SMALL_WORLD_RING PERCENTAGE = 3 F2F = NO -CONNECT_TIMEOUT = 60 +CONNECT_TIMEOUT = 60 s CONNECT_ATTEMPTS = 3 #DEBUG = YES HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat MAX_CONCURRENT_SSH = 20 USE_PROGRESSBARS = YES -PEERGROUP_TIMEOUT = 1000 +PEERGROUP_TIMEOUT = 1000 s DELETE_FILES = NO -- cgit v1.2.3