diff options
author | Bart Polot <bart@net.in.tum.de> | 2012-11-13 18:41:58 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2012-11-13 18:41:58 +0000 |
commit | eb2def8dfd5a4042785a5e3540fb369760f2b9a3 (patch) | |
tree | c2ee308e6870dde33ebc2b57420db25b853c7bf0 | |
parent | 6bb3af348c931d7a01bf2b063ad9e2e294cc7af9 (diff) | |
download | gnunet-eb2def8dfd5a4042785a5e3540fb369760f2b9a3.tar.gz gnunet-eb2def8dfd5a4042785a5e3540fb369760f2b9a3.zip |
- more mesh regex stats
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 63dc69f01..81e2523fe 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -1772,6 +1772,10 @@ regex_iterator (void *cls, | |||
1772 | size = sizeof (block); | 1772 | size = sizeof (block); |
1773 | block.key = *key; | 1773 | block.key = *key; |
1774 | block.id = my_full_id; | 1774 | block.id = my_full_id; |
1775 | GNUNET_STATISTICS_update (stats, "# regex accepting blocks stored", | ||
1776 | 1, GNUNET_NO); | ||
1777 | GNUNET_STATISTICS_update (stats, "# regex accepting block bytes stored", | ||
1778 | sizeof (block), GNUNET_NO); | ||
1775 | (void) | 1779 | (void) |
1776 | GNUNET_DHT_put(dht_handle, key, | 1780 | GNUNET_DHT_put(dht_handle, key, |
1777 | dht_replication_level, | 1781 | dht_replication_level, |
@@ -1830,6 +1834,11 @@ regex_iterator (void *cls, | |||
1830 | GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS), /* FIXME: this should be an option */ | 1834 | GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS), /* FIXME: this should be an option */ |
1831 | app_announce_time, | 1835 | app_announce_time, |
1832 | NULL, NULL); | 1836 | NULL, NULL); |
1837 | GNUNET_STATISTICS_update (stats, "# regex blocks stored", | ||
1838 | 1, GNUNET_NO); | ||
1839 | GNUNET_STATISTICS_update (stats, "# regex block bytes stored", | ||
1840 | size, GNUNET_NO); | ||
1841 | |||
1833 | GNUNET_free (block); | 1842 | GNUNET_free (block); |
1834 | } | 1843 | } |
1835 | 1844 | ||
@@ -6502,7 +6511,7 @@ dht_get_string_accept_handler (void *cls, struct GNUNET_TIME_Absolute exp, | |||
6502 | const struct MeshRegexAccept *block = data; | 6511 | const struct MeshRegexAccept *block = data; |
6503 | struct MeshRegexSearchContext *ctx = cls; | 6512 | struct MeshRegexSearchContext *ctx = cls; |
6504 | struct MeshRegexSearchInfo *info = ctx->info; | 6513 | struct MeshRegexSearchInfo *info = ctx->info; |
6505 | struct MeshPeerPath *p; | 6514 | // struct MeshPeerPath *p; |
6506 | struct MeshPeerInfo *peer_info; | 6515 | struct MeshPeerInfo *peer_info; |
6507 | 6516 | ||
6508 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got regex results from DHT!\n"); | 6517 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got regex results from DHT!\n"); |