From cee87bde7c1099b526c6c14367f9351e028494c8 Mon Sep 17 00:00:00 2001 From: Marc Dionne Date: Wed, 26 Sep 2012 21:37:33 -0400 Subject: [PATCH] viced: Remove unused gettimeofday calls 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 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- src/viced/afsfileprocs.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/viced/afsfileprocs.c b/src/viced/afsfileprocs.c index 48f837a..8666c22 100644 --- a/src/viced/afsfileprocs.c +++ b/src/viced/afsfileprocs.c @@ -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 */ -- 1.9.4