aboutsummaryrefslogtreecommitdiff
path: root/src/nse
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-11-17 19:18:52 +0000
committerChristian Grothoff <christian@grothoff.org>2011-11-17 19:18:52 +0000
commit7dfd634b17df4e1505c62f2224380a0d38da2e8d (patch)
treedc8846d3455b9aa73f242ab79328bc943749de2c /src/nse
parent775613176d9e33ccdc8bcd468cfb9aab288458c2 (diff)
downloadgnunet-7dfd634b17df4e1505c62f2224380a0d38da2e8d.tar.gz
gnunet-7dfd634b17df4e1505c62f2224380a0d38da2e8d.zip
add units to time, use configuration time api where appropriate, fixing Mantis #1875
Diffstat (limited to 'src/nse')
-rw-r--r--src/nse/gnunet-nse-profiler.c7
-rw-r--r--src/nse/nse.conf6
-rw-r--r--src/nse/nse_profiler_test.conf10
-rw-r--r--src/nse/test_nse.conf8
4 files changed, 14 insertions, 17 deletions
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,
557 } 557 }
558 558
559 if (GNUNET_OK != 559 if (GNUNET_OK !=
560 GNUNET_CONFIGURATION_get_value_number (testing_cfg, "nse-profiler", 560 GNUNET_CONFIGURATION_get_value_time (testing_cfg, "nse-profiler",
561 "wait_time", &temp_wait)) 561 "WAIT_TIME", &wait_time))
562 { 562 {
563 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 563 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
564 "Option nse-profiler:wait_time is required!\n"); 564 "Option nse-profiler:wait_time is required!\n");
@@ -611,9 +611,6 @@ run (void *cls, char *const *args, const char *cfgfile,
611 } 611 }
612 612
613 613
614 wait_time =
615 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_wait);
616
617 if (GNUNET_YES == 614 if (GNUNET_YES ==
618 GNUNET_CONFIGURATION_get_value_string (cfg, "nse-profiler", "output_file", 615 GNUNET_CONFIGURATION_get_value_string (cfg, "nse-profiler", "output_file",
619 &temp_str)) 616 &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
14HISTOGRAM = $SERVICEHOME/nse-history.log 14HISTOGRAM = $SERVICEHOME/nse-history.log
15 15
16# How 'slowly' should the proof-of-work be constructed (delay 16# How 'slowly' should the proof-of-work be constructed (delay
17# between rounds in ms); sane values between 0 and ~1000. 17# between rounds); sane values between 0 and ~1000.
18WORKDELAY = 5 18WORKDELAY = 5 ms
19 19
20# Note: changing any of the values below will make this peer 20# Note: changing any of the values below will make this peer
21# completely incompatible with other peers! 21# completely incompatible with other peers!
22INTERVAL = 3600000 22INTERVAL = 1 h
23WORKBITS = 20 23WORKBITS = 20
24 24
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
13CONFIG = $DEFAULTCONFIG 13CONFIG = $DEFAULTCONFIG
14# Overriding network settings for faster testing (do NOT use 14# Overriding network settings for faster testing (do NOT use
15# these values in production just because they are here) 15# these values in production just because they are here)
16WORKDELAY = 10000 16WORKDELAY = 10 s
17INTERVAL = 15000 17INTERVAL = 15 s
18WORKBITS = 0 18WORKBITS = 0
19PROOFFILE = $SERVICEHOME/nse.proof 19PROOFFILE = $SERVICEHOME/nse.proof
20 20
@@ -80,13 +80,13 @@ CONNECT_TOPOLOGY = SMALL_WORLD_RING
80PERCENTAGE = 3 80PERCENTAGE = 3
81#PROBABILITY = .1 81#PROBABILITY = .1
82F2F = NO 82F2F = NO
83CONNECT_TIMEOUT = 60 83CONNECT_TIMEOUT = 60 s
84CONNECT_ATTEMPTS = 3 84CONNECT_ATTEMPTS = 3
85#DEBUG = YES 85#DEBUG = YES
86HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat 86HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
87MAX_CONCURRENT_SSH = 20 87MAX_CONCURRENT_SSH = 20
88USE_PROGRESSBARS = YES 88USE_PROGRESSBARS = YES
89PEERGROUP_TIMEOUT = 1000 89PEERGROUP_TIMEOUT = 1000 s
90TOPOLOGY_OUTPUT_FILE = nse_topo_1000_peers_initial 90TOPOLOGY_OUTPUT_FILE = nse_topo_1000_peers_initial
91MAX_OUTSTANDING_CONNECTIONS = 200 91MAX_OUTSTANDING_CONNECTIONS = 200
92#SINGLE_PEERINFO_PER_HOST = YES 92#SINGLE_PEERINFO_PER_HOST = YES
@@ -105,5 +105,5 @@ TOPOLOGY_OUTPUT_FILE = nse_topo_100_peers
105#ROUND3 = 100 105#ROUND3 = 100
106#ROUND2 = 500 106#ROUND2 = 500
107#ROUND3 = 1000 107#ROUND3 = 1000
108WAIT_TIME = 120 108WAIT_TIME = 120 s
109CONNECTION_LIMIT = 10 109CONNECTION_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
14PROOFFILE = $SERVICEHOME/proof.nse 14PROOFFILE = $SERVICEHOME/proof.nse
15# Overriding network settings for faster testing (do NOT use 15# Overriding network settings for faster testing (do NOT use
16# these values in production just because they are here) 16# these values in production just because they are here)
17WORKDELAY = 1 17WORKDELAY = 1 ms
18INTERVAL = 60000 18INTERVAL = 60 s
19WORKBITS = 1 19WORKBITS = 1
20 20
21HISTOGRAM = $SERVICEHOME/nse-histogram 21HISTOGRAM = $SERVICEHOME/nse-histogram
@@ -64,13 +64,13 @@ TOPOLOGY = NONE
64CONNECT_TOPOLOGY = SMALL_WORLD_RING 64CONNECT_TOPOLOGY = SMALL_WORLD_RING
65PERCENTAGE = 3 65PERCENTAGE = 3
66F2F = NO 66F2F = NO
67CONNECT_TIMEOUT = 60 67CONNECT_TIMEOUT = 60 s
68CONNECT_ATTEMPTS = 3 68CONNECT_ATTEMPTS = 3
69#DEBUG = YES 69#DEBUG = YES
70HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat 70HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat
71MAX_CONCURRENT_SSH = 20 71MAX_CONCURRENT_SSH = 20
72USE_PROGRESSBARS = YES 72USE_PROGRESSBARS = YES
73PEERGROUP_TIMEOUT = 1000 73PEERGROUP_TIMEOUT = 1000 s
74 74
75DELETE_FILES = NO 75DELETE_FILES = NO
76 76