diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-08-02 02:41:57 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-08-02 02:41:57 +0200 |
commit | 4e42b9996f05c988f7ab61084b758fb3d1626760 (patch) | |
tree | ed77fa3f59721bc558c904e51ba61bd602c1e4bc /sys/src/cmd/iostats.c | |
parent | 23aaa0c59cb0bf3e82e587571ee70d2c5c9e410b (diff) |
iostats: cleanup, remove bogus Maxrpc constant
Diffstat (limited to 'sys/src/cmd/iostats.c')
-rw-r--r-- | sys/src/cmd/iostats.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/src/cmd/iostats.c b/sys/src/cmd/iostats.c index 0807f5bb1..477faeaad 100644 --- a/sys/src/cmd/iostats.c +++ b/sys/src/cmd/iostats.c @@ -11,7 +11,6 @@ enum{ Maxfile = 1000, /* number of Files we'll log */ - Maxrpc = 20000,/* number of RPCs we'll log */ }; typedef struct File File; @@ -74,7 +73,7 @@ struct Stats vlong totwrite; ulong nrpc; vlong nproto; - Rpc rpc[Maxrpc]; + Rpc rpc[Tmax]; File file[Maxfile]; }; @@ -377,7 +376,7 @@ main(int argc, char **argv) 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)) { @@ -487,7 +486,7 @@ main(int argc, char **argv) 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; @@ -504,7 +503,7 @@ main(int argc, char **argv) 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; |