[Opendnssec-commits] [keihatsu.kirei.se/svn/dnssec] r4046 - trunk/OpenDNSSEC/signer/src/signer

Matthijs Mekking matthijs at nlnetlabs.nl
Tue Oct 5 09:52:53 CEST 2010


Author: matthijs
Date: 2010-10-05 09:52:53 +0200 (Tue, 05 Oct 2010)
New Revision: 4046

Modified:
   trunk/OpenDNSSEC/signer/src/signer/stats.c
   trunk/OpenDNSSEC/signer/src/signer/stats.h
   trunk/OpenDNSSEC/signer/src/signer/tools.c
Log:
stats: audit time



Modified: trunk/OpenDNSSEC/signer/src/signer/stats.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/stats.c	2010-10-04 12:16:08 UTC (rev 4045)
+++ trunk/OpenDNSSEC/signer/src/signer/stats.c	2010-10-05 07:52:53 UTC (rev 4046)
@@ -63,6 +63,7 @@
     stats->sig_count = 0;
     stats->sig_reuse = 0;
     stats->sig_time = 0;
+    stats->audit_time = 0;
     stats->start_time = 0;
     stats->end_time = 0;
 }
@@ -83,14 +84,14 @@
         avsign = (uint32_t) (stats->sig_count/stats->sig_time);
     }
 
-    se_log_info("[STATS] %s RR[count=%u time=%u(sec)) "
+    se_log_info("[STATS] %s RR[count=%u time=%u(sec)] "
         "NSEC%s[count=%u time=%u(sec)] "
         "RRSIG[new=%u reused=%u time=%u(sec) avg=%u(sig/sec)] "
-        "TOTAL[time=%u(sec)] ",
+        "AUDIT[time=%u(sec)] TOTAL[time=%u(sec)] ",
         name?name:"(null)", stats->sort_count, stats->sort_time,
         nsec_type==LDNS_RR_TYPE_NSEC3?"3":"", stats->nsec_count,
-        stats->nsec_time,
-        stats->sig_count, stats->sig_reuse, stats->sig_time, avsign,
+        stats->nsec_time, stats->sig_count, stats->sig_reuse,
+        stats->sig_time, avsign, stats->audit_time,
         (uint32_t) (stats->end_time - stats->start_time));
     return;
 }

Modified: trunk/OpenDNSSEC/signer/src/signer/stats.h
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/stats.h	2010-10-04 12:16:08 UTC (rev 4045)
+++ trunk/OpenDNSSEC/signer/src/signer/stats.h	2010-10-05 07:52:53 UTC (rev 4046)
@@ -59,6 +59,7 @@
     uint32_t    sig_count;
     uint32_t    sig_reuse;
     time_t      sig_time;
+    time_t      audit_time;
     time_t      start_time;
     time_t      end_time;
 };

Modified: trunk/OpenDNSSEC/signer/src/signer/tools.c
===================================================================
--- trunk/OpenDNSSEC/signer/src/signer/tools.c	2010-10-04 12:16:08 UTC (rev 4045)
+++ trunk/OpenDNSSEC/signer/src/signer/tools.c	2010-10-05 07:52:53 UTC (rev 4046)
@@ -197,6 +197,8 @@
     char* finalized = NULL;
     char str[SYSTEM_MAXLEN];
     int error = 0;
+    time_t start = 0;
+    time_t end = 0;
 
     se_log_assert(zone);
     se_log_assert(zone->signconf);
@@ -225,6 +227,7 @@
             finalized?finalized:"(null)",
             zone->name?zone->name:"(null)");
 
+        start = time(NULL);
         se_log_debug("system call: %s", str);
         error = system(str);
         if (finalized) {
@@ -233,6 +236,8 @@
             }
             se_free((void*)finalized);
         }
+        end = time(NULL);
+        zone->stats->audit_time = (end-start);
     }
     return error;
 }




More information about the Opendnssec-commits mailing list