[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: add statistic on namestore
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: add statistic on namestore iteration delay |
Date: |
Mon, 30 Apr 2018 11:46:28 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 5d9d356c1 add statistic on namestore iteration delay
5d9d356c1 is described below
commit 5d9d356c1426eb6f1b1e5b9f12b28d6a9faf410f
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Apr 30 11:46:25 2018 +0200
add statistic on namestore iteration delay
---
src/namestore/gnunet-service-namestore.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/namestore/gnunet-service-namestore.c
b/src/namestore/gnunet-service-namestore.c
index b9061ed9f..c6bab15b7 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -1416,12 +1416,15 @@ run_zone_iteration_round (struct ZoneIteration *zi,
struct ZoneIterationProcResult proc;
struct GNUNET_MQ_Envelope *env;
struct RecordResultMessage *rrm;
+ struct GNUNET_TIME_Absolute start;
+ struct GNUNET_TIME_Relative duration;
memset (&proc,
0,
sizeof (proc));
proc.zi = zi;
proc.limit = limit;
+ start = GNUNET_TIME_absolute_get ();
GNUNET_break (GNUNET_SYSERR !=
GSN_database->iterate_records (GSN_database->cls,
(0 == memcmp (&zi->zone,
@@ -1433,6 +1436,13 @@ run_zone_iteration_round (struct ZoneIteration *zi,
limit,
&zone_iterate_proc,
&proc));
+ duration = GNUNET_TIME_absolute_get_duration (start);
+ duration = GNUNET_TIME_relative_divide (duration,
+ limit - proc.limit);
+ GNUNET_STATISTICS_set (statistics,
+ "NAMESTORE iteration delay (μs/record)",
+ duration.rel_value_us,
+ GNUNET_NO);
zi->offset += (limit - proc.limit);
if (0 == proc.limit)
{
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: add statistic on namestore iteration delay,
gnunet <=