summaryrefslogtreecommitdiffstats
path: root/src/cmd/venti/httpd.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-03-13 04:35:13 +0000
committerrsc <devnull@localhost>2004-03-13 04:35:13 +0000
commit333c1dccc2f9af67b9c3d8513cca492d022fab4f (patch)
treedb2339b876058f9b21c228ce500336a88d6b954e /src/cmd/venti/httpd.c
parent9ffbb5adcaeec878d3b6db0f8b1f654e839b4689 (diff)
downloadplan9port-333c1dccc2f9af67b9c3d8513cca492d022fab4f.tar.gz
plan9port-333c1dccc2f9af67b9c3d8513cca492d022fab4f.zip
Add binary fraction tree index.
The old index code is still supported too. Buildindex and checkindex need to be revisited, though they should be easy to adapt.
Diffstat (limited to 'src/cmd/venti/httpd.c')
-rw-r--r--src/cmd/venti/httpd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/venti/httpd.c b/src/cmd/venti/httpd.c
index 859c106e..6bd63718 100644
--- a/src/cmd/venti/httpd.c
+++ b/src/cmd/venti/httpd.c
@@ -258,6 +258,7 @@ estats(HConnect *c)
hprint(hout, "index disk reads=%,ld\n", stats.indexreads);
hprint(hout, "index disk reads for modify=%,ld\n", stats.indexwreads);
hprint(hout, "index disk reads for allocation=%,ld\n", stats.indexareads);
+ hprint(hout, "index block splits=%,ld\n", stats.indexsplits);
hprint(hout, "index cache lookups=%,ld\n", stats.iclookups);
hprint(hout, "index cache hits=%,ld %d%%\n", stats.ichits,
@@ -277,7 +278,8 @@ estats(HConnect *c)
hprint(hout, "disk cache flushes=%,ld\n", stats.dcacheflushes);
hprint(hout, "disk cache flush writes=%,ld (%,ld per flush)\n",
- stats.dcacheflushwrites, stats.dcacheflushwrites/stats.dcacheflushes);
+ stats.dcacheflushwrites,
+ stats.dcacheflushwrites/(stats.dcacheflushes ? stats.dcacheflushes : 1));
hprint(hout, "disk writes=%,ld\n", stats.diskwrites);
hprint(hout, "disk bytes written=%,lld\n", stats.diskbwrites);
@@ -368,7 +370,7 @@ dindex(HConnect *c)
ix->name, ix->version, ix->blocksize, ix->tabsize);
hprint(hout, "\tbuckets=%d div=%d\n", ix->buckets, ix->div);
for(i = 0; i < ix->nsects; i++)
- hprint(hout, "\tsect=%s for buckets [%lld,%lld)\n", ix->smap[i].name, ix->smap[i].start, ix->smap[i].stop);
+ hprint(hout, "\tsect=%s for buckets [%lld,%lld) buckmax=%d\n", ix->smap[i].name, ix->smap[i].start, ix->smap[i].stop, ix->sects[i]->buckmax);
for(i = 0; i < ix->narenas; i++){
if(ix->arenas[i] != nil && ix->arenas[i]->clumps != 0){
hprint(hout, "arena=%s at index [%lld,%lld)\n\t", ix->amap[i].name, ix->amap[i].start, ix->amap[i].stop);