summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-01-03 17:34:50 +0100
committerJulian Andres Klode <jak@debian.org>2016-01-03 17:34:50 +0100
commit6d7fc45ed4e22163bba6478c7523f4509d200c58 (patch)
tree077b62eea6cdb12da25d2f45db0e9a557d5f2fcb /cmdline
parent084faf6a41eaf7f0fb52c0210b0cc7fbf22a7ac6 (diff)
apt-cache: stats: Average is over used, not all, buckets
It does not make sense to consider empty buckets in the average, as they do not affect the lookup performance.
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-cache.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 247f612c2..7139bdeac 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -172,7 +172,7 @@ static void ShowHashTableStats(std::string Type,
cout << "Total buckets in " << Type << ": " << NumBuckets << std::endl;
cout << " Unused: " << UnusedBuckets << std::endl;
cout << " Used: " << UsedBuckets << std::endl;
- cout << " Average entries: " << Entries/(double)NumBuckets << std::endl;
+ cout << " Average entries: " << Entries/(double)UsedBuckets << std::endl;
cout << " Longest: " << LongestBucket << std::endl;
cout << " Shortest: " << ShortestBucket << std::endl;
}