afs: remove stats dead code
[openafs.git] / src / afs / afs_stat.c
index 6d49cd6..7145001 100644 (file)
@@ -1,15 +1,20 @@
-/* afs_stat.c */
-
 /*
- * (C) Copyright 1990 Transarc Corporation.
+ * Copyright 2000, International Business Machines Corporation and others.
  * All Rights Reserved.
+ *
+ * This software has been released under the terms of the IBM Public
+ * License.  For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
  */
 
 /* statistics-gathering package */
 
-#include "../afs/param.h"       /*Should be always first*/
-#include "../afs/sysincludes.h" /*Standard vendor system headers*/
-#include "../afs/afsincludes.h" /*AFS-based standard headers*/
+#include <afsconfig.h>
+#include "afs/param.h"
+
+
+#include "afs/sysincludes.h"   /*Standard vendor system headers */
+#include "afsincludes.h"       /*AFS-based standard headers */
 #include "afs_stats.h"
 
 struct afs_CMStats afs_cmstats;
@@ -31,21 +36,20 @@ afs_int32 afs_stats_XferSumBytes[AFS_STATS_NUM_FS_XFER_OPS];
  * Environment:
  *     This routine should only be called once, at initialization time.
  */
-void afs_InitStats()
-
-{ /*afs_InitStats*/
-
-    struct afs_stats_opTimingData *opTimeP;    /*Ptr to curr timing struct*/
-    struct afs_stats_xferData *xferP;          /*Ptr to curr xfer struct*/
-    int currIdx;                               /*Current index*/
+void
+afs_InitStats(void)
+{
+    struct afs_stats_opTimingData *opTimeP;    /*Ptr to curr timing struct */
+    struct afs_stats_xferData *xferP;  /*Ptr to curr xfer struct */
+    int currIdx;               /*Current index */
 
     /*
      * First step is to zero everything out.
      */
-    bzero((char *)(&afs_cmstats), sizeof(struct afs_CMStats));
-    bzero((char *)(&afs_stats_cmperf), sizeof(struct afs_stats_CMPerf));
-    bzero((char *)(&afs_stats_cmfullperf),
-         sizeof(struct afs_stats_CMFullPerf));
+    memset((&afs_cmstats), 0, sizeof(struct afs_CMStats));
+    memset((&afs_stats_cmperf), 0, sizeof(struct afs_stats_CMPerf));
+    memset((&afs_stats_cmfullperf), 0,
+          sizeof(struct afs_stats_CMFullPerf));
 
     /*
      * Some fields really should be non-zero at the start, so set 'em up.
@@ -53,11 +57,13 @@ void afs_InitStats()
     afs_stats_cmperf.srvNumBuckets = NSERVERS;
 
     opTimeP = &(afs_stats_cmfullperf.rpc.fsRPCTimes[0]);
-    for (currIdx = 0; currIdx < AFS_STATS_NUM_FS_RPC_OPS; currIdx++, opTimeP++)
+    for (currIdx = 0; currIdx < AFS_STATS_NUM_FS_RPC_OPS;
+        currIdx++, opTimeP++)
        opTimeP->minTime.tv_sec = 999999;
 
     opTimeP = &(afs_stats_cmfullperf.rpc.cmRPCTimes[0]);
-    for (currIdx = 0; currIdx < AFS_STATS_NUM_CM_RPC_OPS; currIdx++, opTimeP++)
+    for (currIdx = 0; currIdx < AFS_STATS_NUM_CM_RPC_OPS;
+        currIdx++, opTimeP++)
        opTimeP->minTime.tv_sec = 999999;
 
     xferP = &(afs_stats_cmfullperf.rpc.fsXferTimes[0]);
@@ -65,25 +71,4 @@ void afs_InitStats()
        xferP->minTime.tv_sec = 999999;
        xferP->minBytes = 999999999;
     }
-    
-} /*afs_InitStats*/
-
-
-
-afs_GetCMStat(ptr, size)
-     char **ptr; /* memory area */
-     unsigned *size; /* # of bytes */
-  {
-#ifndef AFS_NOSTATS
-      AFS_STATCNT(afs_GetCMStat);
-      *ptr = (char *)&afs_cmstats;
-      *size = sizeof(afs_cmstats);
-#endif /* AFS_NOSTATS */
-  }
-
-afs_AddToMean(oldMean, newValue)
-     struct afs_MeanStats *oldMean;
-     afs_int32 newValue;
-  {
-      AFS_STATCNT(afs_AddToMean);
-  }
+}