diff options
author | Not Zed <NotZed@HelixCode.com> | 2000-10-12 21:40:55 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-10-12 21:40:55 +0800 |
commit | 1deca02b41aae9bf2632ea1420cc900fcf41531d (patch) | |
tree | e26816ec82c3990801aca2a35686d5df2ba00957 /libibex/index.h | |
parent | 6c337e9ea0623b48688c018973d35823dde21f60 (diff) | |
download | gsoc2013-evolution-1deca02b41aae9bf2632ea1420cc900fcf41531d.tar.gz gsoc2013-evolution-1deca02b41aae9bf2632ea1420cc900fcf41531d.tar.zst gsoc2013-evolution-1deca02b41aae9bf2632ea1420cc900fcf41531d.zip |
Added some stat stuff.
2000-10-12 Not Zed <NotZed@HelixCode.com>
* index.h: Added some stat stuff.
* wordindex.c (struct _wordcache): Changed files[] to be a pointer
to an allocated block/or an individual item.
(find): Fix for changes to struct.
(find_name): "
(sync_cache_entry): "
(add): "
(add_list): "
(add_index_cache): Free the cache file array if it was created.
(word_flush): And here.
(word_close): And here too.
(ibex_create_word_index): Double the size of the hashtables.
(word_flush): Make sure we reset the wordcount to 0 if we remove
the list items. DOH.
(add_index_cache): Use a slightly more sohpisticated aging
algorithm to remove expired nodes.
2000-10-10 Not Zed <NotZed@HelixCode.com>
* hash.c (hash_find):
(hash_remove):
(hash_insert): Truncate key if it is too big to fit in a
single block to MAX_KEYLEN bytes.
svn path=/trunk/; revision=5882
Diffstat (limited to 'libibex/index.h')
-rw-r--r-- | libibex/index.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libibex/index.h b/libibex/index.h index 35e3df23c2..c3c83c1bcf 100644 --- a/libibex/index.h +++ b/libibex/index.h @@ -25,10 +25,16 @@ /* an indexing 'class' maps a key to 1 piece of info */ +#define INDEX_STAT + struct _IBEXIndex { struct _IBEXIndexClass *klass; struct _memcache *blocks; blockid_t root; /* root block of ondisk index data */ +#ifdef INDEX_STAT + int lookups; /* how many lookups */ + int lookup_total; /* how many blocks loaded for all lookups (hash chain depth) */ +#endif }; struct _IBEXIndexClass { |