[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r8639 - GNUnet/src/applications/dhtlog_mysql
From: |
gnunet |
Subject: |
[GNUnet-SVN] r8639 - GNUnet/src/applications/dhtlog_mysql |
Date: |
Tue, 7 Jul 2009 16:42:01 -0600 |
Author: nevans
Date: 2009-07-07 16:42:01 -0600 (Tue, 07 Jul 2009)
New Revision: 8639
Modified:
GNUnet/src/applications/dhtlog_mysql/check.conf
GNUnet/src/applications/dhtlog_mysql/dhtlog_mysql.c
GNUnet/src/applications/dhtlog_mysql/dhtlog_test.c
Log:
dhtlog_mysql changes
Modified: GNUnet/src/applications/dhtlog_mysql/check.conf
===================================================================
--- GNUnet/src/applications/dhtlog_mysql/check.conf 2009-07-07 22:41:14 UTC
(rev 8638)
+++ GNUnet/src/applications/dhtlog_mysql/check.conf 2009-07-07 22:42:01 UTC
(rev 8639)
@@ -25,6 +25,7 @@
WEAKRANDOM = YES
[MULTIPLE_SERVER_TESTING]
-MYSQL_DB = dhttests
-MYSQL_USER = dht
-MYSQL_PASSWORD = dht**
+#MYSQL_SERVER = 130.253.191.50
+#MYSQL_DB = dhttests
+#MYSQL_USER = dht
+#MYSQL_PASSWORD = dht**
Modified: GNUnet/src/applications/dhtlog_mysql/dhtlog_mysql.c
===================================================================
--- GNUnet/src/applications/dhtlog_mysql/dhtlog_mysql.c 2009-07-07 22:41:14 UTC
(rev 8638)
+++ GNUnet/src/applications/dhtlog_mysql/dhtlog_mysql.c 2009-07-07 22:42:01 UTC
(rev 8639)
@@ -61,8 +61,8 @@
"VALUES (?, ?)"
static struct GNUNET_MysqlStatementHandle *insert_node;
-#define INSERT_TRIALS_STMT "INSERT INTO trials (starttime, numnodes, topology)
"\
- "VALUES (NOW(), ?, ?)"
+#define INSERT_TRIALS_STMT "INSERT INTO trials (starttime, numnodes, topology,
puts, gets, concurrent) "\
+ "VALUES (NOW(), ?, ?, ?, ?, ?)"
static struct GNUNET_MysqlStatementHandle *insert_trial;
#define INSERT_DHTKEY_STMT "INSERT INTO dhtkeys (dhtkey, trialuid) "\
@@ -156,6 +156,9 @@
"`trialuid` int(10) unsigned NOT NULL auto_increment,"
"`numnodes` int(10) unsigned NOT NULL,"
"`topology` int(10) NOT NULL,"
+ "`puts` int(10) unsigned NOT NULL,"
+ "`gets` int(10) unsigned NOT NULL,"
+ "`concurrent` int(10) unsigned NOT NULL,"
"`starttime` datetime NOT NULL,"
"`endtime` datetime NOT NULL,"
"PRIMARY KEY (`trialuid`),"
@@ -237,7 +240,8 @@
* Inserts the specified trial into the dhttests.trials table
*/
int
-add_trial (unsigned long long *trialuid, int num_nodes, int topology)
+add_trial (unsigned long long *trialuid, int num_nodes, int topology,
+ int puts, int gets, int concurrent)
{
int ret;
if (GNUNET_OK !=
@@ -247,7 +251,17 @@
&num_nodes,
GNUNET_YES,
MYSQL_TYPE_LONG,
- &topology, GNUNET_YES, -1)))
+ &topology,
+ GNUNET_YES,
+ MYSQL_TYPE_LONG,
+ &puts,
+ GNUNET_YES,
+ MYSQL_TYPE_LONG,
+ &gets,
+ GNUNET_YES,
+ MYSQL_TYPE_LONG,
+ &concurrent,
+ GNUNET_YES, -1)))
{
if (ret == GNUNET_SYSERR)
{
@@ -382,7 +396,7 @@
return GNUNET_SYSERR;
GNUNET_hash_to_enc (&node->hashPubKey, &encPeer);
- p_len = (unsigned long)strlen ((char *) &encPeer);
+ p_len = (unsigned long) strlen ((char *) &encPeer);
if (GNUNET_OK !=
(ret = GNUNET_MYSQL_prepared_statement_run (insert_node,
nodeuid,
@@ -683,10 +697,7 @@
get_current_trial (¤t_trial);
GNUNET_GE_LOG (coreAPI->ectx,
GNUNET_GE_WARNING | GNUNET_GE_ADMIN | GNUNET_GE_USER |
- GNUNET_GE_BULK,
- _
- ("current trial is %llu\n"),
- current_trial);
+ GNUNET_GE_BULK, _("current trial is %llu\n"), current_trial);
return &api;
}
Modified: GNUnet/src/applications/dhtlog_mysql/dhtlog_test.c
===================================================================
--- GNUnet/src/applications/dhtlog_mysql/dhtlog_test.c 2009-07-07 22:41:14 UTC
(rev 8638)
+++ GNUnet/src/applications/dhtlog_mysql/dhtlog_test.c 2009-07-07 22:42:01 UTC
(rev 8639)
@@ -63,7 +63,7 @@
memset (&k1, 0, sizeof (GNUNET_HashCode));
memset (&k2, 1, sizeof (GNUNET_HashCode));
- ret = api->insert_trial (&trialuid, i, 5);
+ ret = api->insert_trial (&trialuid, i, 5, 0, 0, 0);
fprintf (stderr, "Trial uid is %llu\n", trialuid);
if (ret != GNUNET_OK)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r8639 - GNUnet/src/applications/dhtlog_mysql,
gnunet <=