[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6357 - GNUnet/src/applications/fs/gap
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6357 - GNUnet/src/applications/fs/gap |
Date: |
Sun, 17 Feb 2008 20:09:30 -0700 (MST) |
Author: grothoff
Date: 2008-02-17 20:09:30 -0700 (Sun, 17 Feb 2008)
New Revision: 6357
Modified:
GNUnet/src/applications/fs/gap/plan.c
GNUnet/src/applications/fs/gap/querymanager.c
Log:
larger bf
Modified: GNUnet/src/applications/fs/gap/plan.c
===================================================================
--- GNUnet/src/applications/fs/gap/plan.c 2008-02-18 02:59:06 UTC (rev
6356)
+++ GNUnet/src/applications/fs/gap/plan.c 2008-02-18 03:09:30 UTC (rev
6357)
@@ -202,6 +202,8 @@
static int stat_gap_query_success;
+static int stat_gap_bf_query_injected;
+
/**
* Find the entry in the client list corresponding
* to the given client information. If no such entry
Modified: GNUnet/src/applications/fs/gap/querymanager.c
===================================================================
--- GNUnet/src/applications/fs/gap/querymanager.c 2008-02-18 02:59:06 UTC
(rev 6356)
+++ GNUnet/src/applications/fs/gap/querymanager.c 2008-02-18 03:09:30 UTC
(rev 6357)
@@ -83,7 +83,9 @@
static int stat_gap_client_query_injected;
+static int stat_gap_client_bf_updates;
+
/**
* A client is asking us to run a query. The query should be issued
* until either a unique response has been obtained or until the
@@ -165,8 +167,10 @@
{
unsigned short size;
unsigned short max = 1 << 15;
- unsigned int ideal = (entry_count * GAP_BLOOMFILTER_K) / 8;
+ unsigned int ideal = (entry_count * GAP_BLOOMFILTER_K) / 4;
+ if (entry_count > max)
+ return max;
size = 8;
while ((size < max) && (size < ideal))
size *= 2;
@@ -270,6 +274,8 @@
NULL,
rl->bloomfilter_size,
GAP_BLOOMFILTER_K);
+ if (stats != NULL)
+ stats->change(stat_gap_client_bf_updates, 1);
}
else if (rl->bloomfilter_size != bf_size)
{
@@ -280,6 +286,8 @@
GNUNET_bloomfilter_resize (rl->bloomfilter,
&response_bf_iterator,
&ic, bf_size, GAP_BLOOMFILTER_K);
+ if (stats != NULL)
+ stats->change(stat_gap_client_bf_updates, 1);
}
GNUNET_FS_SHARED_mark_response_seen (rl, &hc);
@@ -464,6 +472,8 @@
stats->create (gettext_noop ("# gap client requests tracked"));
stat_gap_client_query_injected =
stats->create (gettext_noop ("# gap client requests injected"));
+ stat_gap_client_bf_query_injected =
+ stats->create (gettext_noop ("# gap query bloomfilter updates"));
}
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6357 - GNUnet/src/applications/fs/gap,
gnunet <=