viced: Remove unused gettimeofday calls
authorMarc Dionne <marc.c.dionne@gmail.com>
Thu, 27 Sep 2012 01:37:33 +0000 (21:37 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Thu, 27 Sep 2012 02:43:18 +0000 (19:43 -0700)
StartTime and EndTime are set with gettimeofday(), but are not
used for any calcualtions or statistics, and appear to never have
been used.  There are platforms where gettimeofday is expensive,
so remove the variables and the calls.

Change-Id: I9ff8035377227cb07383ffea15b7e04f155e307f
Reviewed-on: http://gerrit.openafs.org/8164
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/viced/afsfileprocs.c

index 48f837a..8666c22 100644 (file)
@@ -6336,7 +6336,6 @@ StoreData_RXStyle(Volume * volptr, Vnode * targetptr, struct AFSFid * Fid,
                  afs_sfsize_t * a_bytesStoredP)
 {
     afs_sfsize_t bytesTransfered;      /* number of bytes actually transfered */
-    struct timeval StartTime, StopTime;        /* Used to measure how long the store takes */
     Error errorCode = 0;               /* Returned error code to caller */
 #ifndef HAVE_PIOV
     char *tbuffer;     /* data copying buffer */
@@ -6477,8 +6476,6 @@ StoreData_RXStyle(Volume * volptr, Vnode * targetptr, struct AFSFid * Fid,
     /* this bit means that the locks are set and protections are OK */
     rx_SetLocalStatus(Call, 1);
 
-    gettimeofday(&StartTime, 0);
-
     optSize = sendBufSize;
     ViceLog(25,
            ("StoreData_RXStyle: Pos %llu, DataLength %llu, FileLength %llu, Length %llu\n",
@@ -6576,8 +6573,6 @@ StoreData_RXStyle(Volume * volptr, Vnode * targetptr, struct AFSFid * Fid,
     }
     FDH_CLOSE(fdP);
 
-    gettimeofday(&StopTime, 0);
-
     VN_SET_LEN(targetptr, NewLength);
 
     /* Update all StoreData related stats */