diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-09-07 10:03:45 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-09-07 10:03:45 +0000 |
commit | e674423144e969eb701cf72f7b0c660c2f5406ca (patch) | |
tree | 95d3b4634599e908e5983eae424ed5a9b7559cc1 /src/dht/plugin_dhtlog_mysql_dump.c | |
parent | e573901041f6367350931c45524e2fd5962b70a6 (diff) | |
download | gnunet-e674423144e969eb701cf72f7b0c660c2f5406ca.tar.gz gnunet-e674423144e969eb701cf72f7b0c660c2f5406ca.zip |
dhtlog updates
Diffstat (limited to 'src/dht/plugin_dhtlog_mysql_dump.c')
-rw-r--r-- | src/dht/plugin_dhtlog_mysql_dump.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/dht/plugin_dhtlog_mysql_dump.c b/src/dht/plugin_dhtlog_mysql_dump.c index 21ddc238e..2fa31d297 100644 --- a/src/dht/plugin_dhtlog_mysql_dump.c +++ b/src/dht/plugin_dhtlog_mysql_dump.c | |||
@@ -71,7 +71,7 @@ static const struct GNUNET_CONFIGURATION_Handle *cfg; | |||
71 | #define SET_MALICIOUS_STMT "prepare set_malicious from 'update nodes set malicious_dropper = 1 where trialuid = @temp_trial and nodeid = @temp_node'" | 71 | #define SET_MALICIOUS_STMT "prepare set_malicious from 'update nodes set malicious_dropper = 1 where trialuid = @temp_trial and nodeid = @temp_node'" |
72 | 72 | ||
73 | #define INSERT_TRIALS_STMT "prepare insert_trial from 'INSERT INTO trials"\ | 73 | #define INSERT_TRIALS_STMT "prepare insert_trial from 'INSERT INTO trials"\ |
74 | "(starttime, numnodes, topology,"\ | 74 | "(starttime, other_trial_identifier, numnodes, topology,"\ |
75 | "topology_percentage, topology_probability,"\ | 75 | "topology_percentage, topology_probability,"\ |
76 | "blacklist_topology, connect_topology, connect_topology_option,"\ | 76 | "blacklist_topology, connect_topology, connect_topology_option,"\ |
77 | "connect_topology_option_modifier, puts, gets, "\ | 77 | "connect_topology_option_modifier, puts, gets, "\ |
@@ -79,7 +79,7 @@ static const struct GNUNET_CONFIGURATION_Handle *cfg; | |||
79 | "malicious_putters, malicious_droppers, malicious_get_frequency,"\ | 79 | "malicious_putters, malicious_droppers, malicious_get_frequency,"\ |
80 | "malicious_put_frequency, stop_closest, stop_found, strict_kademlia, "\ | 80 | "malicious_put_frequency, stop_closest, stop_found, strict_kademlia, "\ |
81 | "gets_succeeded, message) "\ | 81 | "gets_succeeded, message) "\ |
82 | "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'" | 82 | "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'" |
83 | 83 | ||
84 | #define INSERT_GENERIC_STAT_STMT "prepare insert_generic_stat from 'INSERT INTO generic_stats" \ | 84 | #define INSERT_GENERIC_STAT_STMT "prepare insert_generic_stat from 'INSERT INTO generic_stats" \ |
85 | "(trialuid, nodeuid, section, name, value)"\ | 85 | "(trialuid, nodeuid, section, name, value)"\ |
@@ -257,6 +257,8 @@ add_extended_topology (const struct GNUNET_PeerIdentity *first, const struct GNU | |||
257 | * Inserts the specified trial into the dhttests.trials table | 257 | * Inserts the specified trial into the dhttests.trials table |
258 | * | 258 | * |
259 | * @param trialuid return the trialuid of the newly inserted trial | 259 | * @param trialuid return the trialuid of the newly inserted trial |
260 | * @param other_identifier identifier for the trial from another source | ||
261 | * (for joining later) | ||
260 | * @param num_nodes how many nodes are in the trial | 262 | * @param num_nodes how many nodes are in the trial |
261 | * @param topology integer representing topology for this trial | 263 | * @param topology integer representing topology for this trial |
262 | * @param blacklist_topology integer representing blacklist topology for this trial | 264 | * @param blacklist_topology integer representing blacklist topology for this trial |
@@ -283,7 +285,7 @@ add_extended_topology (const struct GNUNET_PeerIdentity *first, const struct GNU | |||
283 | * | 285 | * |
284 | * @return GNUNET_OK on success, GNUNET_SYSERR on failure | 286 | * @return GNUNET_OK on success, GNUNET_SYSERR on failure |
285 | */ | 287 | */ |
286 | int add_trial (unsigned long long *trialuid, unsigned int num_nodes, unsigned int topology, | 288 | int add_trial (unsigned long long *trialuid, unsigned int other_identifier, unsigned int num_nodes, unsigned int topology, |
287 | unsigned int blacklist_topology, unsigned int connect_topology, | 289 | unsigned int blacklist_topology, unsigned int connect_topology, |
288 | unsigned int connect_topology_option, float connect_topology_option_modifier, | 290 | unsigned int connect_topology_option, float connect_topology_option_modifier, |
289 | float topology_percentage, float topology_probability, | 291 | float topology_percentage, float topology_probability, |
@@ -300,14 +302,14 @@ int add_trial (unsigned long long *trialuid, unsigned int num_nodes, unsigned in | |||
300 | if (outfile == NULL) | 302 | if (outfile == NULL) |
301 | return GNUNET_SYSERR; | 303 | return GNUNET_SYSERR; |
302 | 304 | ||
303 | ret = fprintf(outfile, "set @date = \"%s\", @num = %u, @topology = %u, @bl = %u, " | 305 | ret = fprintf(outfile, "set @date = \"%s\", @oid = %u, @num = %u, @topology = %u, @bl = %u, " |
304 | "@connect = %u, @c_t_o = %u, @c_t_o_m = %f, @t_p = %f, " | 306 | "@connect = %u, @c_t_o = %u, @c_t_o_m = %f, @t_p = %f, " |
305 | "@t_pr = %f, @puts = %u, @gets = %u, " | 307 | "@t_pr = %f, @puts = %u, @gets = %u, " |
306 | "@concurrent = %u, @settle = %u, @rounds = %u, " | 308 | "@concurrent = %u, @settle = %u, @rounds = %u, " |
307 | "@m_gets = %u, @m_puts = %u, @m_drops = %u, " | 309 | "@m_gets = %u, @m_puts = %u, @m_drops = %u, " |
308 | "@m_g_f = %u, @m_p_f = %u, @s_c = %u, @s_f = %u," | 310 | "@m_g_f = %u, @m_p_f = %u, @s_c = %u, @s_f = %u," |
309 | "@s_k = %u, @g_s = %u, @message = \"%s\";\n", | 311 | "@s_k = %u, @g_s = %u, @message = \"%s\";\n", |
310 | get_sql_time(), num_nodes, topology, | 312 | get_sql_time(), other_identifier, num_nodes, topology, |
311 | blacklist_topology, connect_topology, | 313 | blacklist_topology, connect_topology, |
312 | connect_topology_option, connect_topology_option_modifier, | 314 | connect_topology_option, connect_topology_option_modifier, |
313 | topology_percentage, topology_probability, | 315 | topology_percentage, topology_probability, |
@@ -319,7 +321,7 @@ int add_trial (unsigned long long *trialuid, unsigned int num_nodes, unsigned in | |||
319 | if (ret < 0) | 321 | if (ret < 0) |
320 | return GNUNET_SYSERR; | 322 | return GNUNET_SYSERR; |
321 | ret = fprintf(outfile, "execute insert_trial using " | 323 | ret = fprintf(outfile, "execute insert_trial using " |
322 | "@date, @num, @topology, @t_p, @t_pr," | 324 | "@date, @oid, @num, @topology, @t_p, @t_pr," |
323 | " @bl, @connect, @c_t_o," | 325 | " @bl, @connect, @c_t_o," |
324 | "@c_t_o_m, @puts, @gets," | 326 | "@c_t_o_m, @puts, @gets," |
325 | "@concurrent, @settle, @rounds," | 327 | "@concurrent, @settle, @rounds," |