struct host *thost;
afs_int32 *dataBuffP;
afs_int32 dataBytes;
-#if FS_STATS_DETAILED
- struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
- struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
- struct timeval elapsedTime; /* Transfer time */
- /*
- * Set our stats pointer, remember when the RPC operation started, and
- * tally the operation.
- */
- opP = &(afs_FullPerfStats.det.rpcOpTimes[FS_STATS_RPCIDX_GETCAPABILITIES]);
FS_LOCK;
- (opP->numOps)++;
+ AFSCallStats.GetCapabilities++, AFSCallStats.TotalCalls++;
+ afs_FullPerfStats.overall.fs_nGetCaps++;
FS_UNLOCK;
- TM_GetTimeOfDay(&opStartTime, 0);
-#endif /* FS_STATS_DETAILED */
+ ViceLog(2, ("SAFS_GetCapabilties\n"));
if ((code = CallPreamble(acall, NOTACTIVECALL, &tcon, &thost)))
goto Bad_GetCaps;
- FS_LOCK;
- AFSCallStats.GetCapabilities++, AFSCallStats.TotalCalls++;
- FS_UNLOCK;
dataBytes = 1 * sizeof(afs_int32);
dataBuffP = (afs_int32 *) malloc(dataBytes);
dataBuffP[0] = CAPABILITY_ERRORTRANS;
capabilities->Capabilities_len = dataBytes / sizeof(afs_int32);
capabilities->Capabilities_val = dataBuffP;
- ViceLog(2, ("SAFS_GetCapabilties\n"));
-
Bad_GetCaps:
code = CallPostamble(tcon, code, thost);
-#if FS_STATS_DETAILED
- TM_GetTimeOfDay(&opStopTime, 0);
- fs_stats_GetDiff(elapsedTime, opStartTime, opStopTime);
- if (code == 0) {
- FS_LOCK;
- (opP->numSuccesses)++;
- fs_stats_AddTo((opP->sumTime), elapsedTime);
- fs_stats_SquareAddTo((opP->sqrTime), elapsedTime);
- if (fs_stats_TimeLessThan(elapsedTime, (opP->minTime))) {
- fs_stats_TimeAssign((opP->minTime), elapsedTime);
- }
- if (fs_stats_TimeGreaterThan(elapsedTime, (opP->maxTime))) {
- fs_stats_TimeAssign((opP->maxTime), elapsedTime);
- }
- FS_UNLOCK;
- }
-#endif /* FS_STATS_DETAILED */
return 0;
}
afs_int32 rx_nBusies; /*Ttl VBUSYs sent to shed load */
afs_int32 fs_nBusies; /*Ttl VBUSYs sent during restart/vol clone */
+ /*
+ * Can't count this as an RPC because it breaks the data structure
+ */
+ afs_int32 fs_nGetCaps; /* Number of GetCapabilities calls */
/*
* Spares
*/
- afs_int32 spare[29];
+ afs_int32 spare[28];
};
#if FS_STATS_DETAILED
#define FS_STATS_RPCIDX_BULKSTATUS 25
#define FS_STATS_RPCIDX_XSTATSVERSION 26
#define FS_STATS_RPCIDX_GETXSTATS 27
-#define FS_STATS_RPCIDX_GETCAPABILITIES 28
-#define FS_STATS_NUM_RPC_OPS 29
+#define FS_STATS_NUM_RPC_OPS 28
/*
* Assign an index to each of the File Server's RPC interface routines
"NGetVolumeInfo",
"BulkStatus",
"XStatsVersion",
- "GetXStats",
- "GetCapabilities"
+ "GetXStats"
};
static char *xferOpNames[] = {
printf("\t%10d rx_nFreeCallStructs\n", a_ovP->rx_nFreeCallStructs);
printf("\t%10d rx_nBusies\n\n", a_ovP->rx_nBusies);
- printf("\t%10d fs_nBusies\n\n", a_ovP->fs_nBusies);
+ printf("\t%10d fs_nBusies\n", a_ovP->fs_nBusies);
+ printf("\t%10d fs_GetCapabilities\n\n", a_ovP->fs_nGetCaps);
/*
* Host module fields.
*/