diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-11-17 19:18:52 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-11-17 19:18:52 +0000 |
commit | 7dfd634b17df4e1505c62f2224380a0d38da2e8d (patch) | |
tree | dc8846d3455b9aa73f242ab79328bc943749de2c /src/nse | |
parent | 775613176d9e33ccdc8bcd468cfb9aab288458c2 (diff) | |
download | gnunet-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.c | 7 | ||||
-rw-r--r-- | src/nse/nse.conf | 6 | ||||
-rw-r--r-- | src/nse/nse_profiler_test.conf | 10 | ||||
-rw-r--r-- | src/nse/test_nse.conf | 8 |
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 | |||
14 | HISTOGRAM = $SERVICEHOME/nse-history.log | 14 | HISTOGRAM = $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. |
18 | WORKDELAY = 5 | 18 | WORKDELAY = 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! |
22 | INTERVAL = 3600000 | 22 | INTERVAL = 1 h |
23 | WORKBITS = 20 | 23 | WORKBITS = 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 | |||
13 | CONFIG = $DEFAULTCONFIG | 13 | CONFIG = $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) |
16 | WORKDELAY = 10000 | 16 | WORKDELAY = 10 s |
17 | INTERVAL = 15000 | 17 | INTERVAL = 15 s |
18 | WORKBITS = 0 | 18 | WORKBITS = 0 |
19 | PROOFFILE = $SERVICEHOME/nse.proof | 19 | PROOFFILE = $SERVICEHOME/nse.proof |
20 | 20 | ||
@@ -80,13 +80,13 @@ CONNECT_TOPOLOGY = SMALL_WORLD_RING | |||
80 | PERCENTAGE = 3 | 80 | PERCENTAGE = 3 |
81 | #PROBABILITY = .1 | 81 | #PROBABILITY = .1 |
82 | F2F = NO | 82 | F2F = NO |
83 | CONNECT_TIMEOUT = 60 | 83 | CONNECT_TIMEOUT = 60 s |
84 | CONNECT_ATTEMPTS = 3 | 84 | CONNECT_ATTEMPTS = 3 |
85 | #DEBUG = YES | 85 | #DEBUG = YES |
86 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat | 86 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat |
87 | MAX_CONCURRENT_SSH = 20 | 87 | MAX_CONCURRENT_SSH = 20 |
88 | USE_PROGRESSBARS = YES | 88 | USE_PROGRESSBARS = YES |
89 | PEERGROUP_TIMEOUT = 1000 | 89 | PEERGROUP_TIMEOUT = 1000 s |
90 | TOPOLOGY_OUTPUT_FILE = nse_topo_1000_peers_initial | 90 | TOPOLOGY_OUTPUT_FILE = nse_topo_1000_peers_initial |
91 | MAX_OUTSTANDING_CONNECTIONS = 200 | 91 | MAX_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 |
108 | WAIT_TIME = 120 | 108 | WAIT_TIME = 120 s |
109 | CONNECTION_LIMIT = 10 | 109 | 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 | |||
14 | PROOFFILE = $SERVICEHOME/proof.nse | 14 | PROOFFILE = $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) |
17 | WORKDELAY = 1 | 17 | WORKDELAY = 1 ms |
18 | INTERVAL = 60000 | 18 | INTERVAL = 60 s |
19 | WORKBITS = 1 | 19 | WORKBITS = 1 |
20 | 20 | ||
21 | HISTOGRAM = $SERVICEHOME/nse-histogram | 21 | HISTOGRAM = $SERVICEHOME/nse-histogram |
@@ -64,13 +64,13 @@ TOPOLOGY = NONE | |||
64 | CONNECT_TOPOLOGY = SMALL_WORLD_RING | 64 | CONNECT_TOPOLOGY = SMALL_WORLD_RING |
65 | PERCENTAGE = 3 | 65 | PERCENTAGE = 3 |
66 | F2F = NO | 66 | F2F = NO |
67 | CONNECT_TIMEOUT = 60 | 67 | CONNECT_TIMEOUT = 60 s |
68 | CONNECT_ATTEMPTS = 3 | 68 | CONNECT_ATTEMPTS = 3 |
69 | #DEBUG = YES | 69 | #DEBUG = YES |
70 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat | 70 | HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat |
71 | MAX_CONCURRENT_SSH = 20 | 71 | MAX_CONCURRENT_SSH = 20 |
72 | USE_PROGRESSBARS = YES | 72 | USE_PROGRESSBARS = YES |
73 | PEERGROUP_TIMEOUT = 1000 | 73 | PEERGROUP_TIMEOUT = 1000 s |
74 | 74 | ||
75 | DELETE_FILES = NO | 75 | DELETE_FILES = NO |
76 | 76 | ||