enum{
Maxfile = 1000, /* number of Files we'll log */
- Maxrpc = 20000,/* number of RPCs we'll log */
};
typedef struct File File;
vlong totwrite;
ulong nrpc;
vlong nproto;
- Rpc rpc[Maxrpc];
+ Rpc rpc[Tmax];
File file[Maxfile];
};
stats->rpc[Tstat].name = "stat";
stats->rpc[Twstat].name = "wstat";
- for(n = 0; n < Maxrpc; n++)
+ for(n = 0; n < nelem(stats->rpc); n++)
stats->rpc[n].lo = 10000000000LL;
switch(rspid = rfork(RFPROC|RFMEM)) {
bwpsec = (double)stats->totwrite / (((float)rpc->time/1e9)+.000001);
ttime = 0;
- for(n = 0; n < Maxrpc; n++) {
+ for(n = 0; n < nelem(stats->rpc); n++) {
rpc = &stats->rpc[n];
if(rpc->count == 0)
continue;
fprint(2, "%-10s %5s %5s %5s %5s %5s T R\n",
"Message", "Count", "Low", "High", "Time", "Averg");
- for(n = 0; n < Maxrpc; n++) {
+ for(n = 0; n < nelem(stats->rpc); n++) {
rpc = &stats->rpc[n];
if(rpc->count == 0)
continue;