initialize the statistics to the current time, not start of epoch
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 15 Nov 2010 05:30:44 +0000 (16:30 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 15 Nov 2010 05:44:21 +0000 (16:44 +1100)
this makes "ctdb statistics" show correct "start of starts collection"

server/ctdb_statistics.c

index aec17ad38d91dd0a08781e2679f1374397937fdb..29e6d6a9b8cc3a17924c71f0eb5ea4ae52495904 100644 (file)
@@ -42,6 +42,7 @@ static void ctdb_statistics_update(struct event_context *ev, struct timed_event
 int ctdb_statistics_init(struct ctdb_context *ctdb)
 {
        bzero(&ctdb->statistics, sizeof(struct ctdb_statistics));
+       ctdb->statistics.statistics_start_time = timeval_current();
 
        bzero(&ctdb->statistics_current, sizeof(struct ctdb_statistics));
        ctdb->statistics_current.statistics_start_time = timeval_current();