Cache->Head().ProvidesCount*Cache->Head().ProvidesSz;
cout << _("Total space accounted for: ") << SizeToStr(Total) << endl;
- // get the hash collisions average
+ // hashtable stats for the PkgHashTable
long NumBuckets = sizeof(Cache->HeaderP->PkgHashTable)/sizeof(map_ptrloc);
long UsedBuckets = 0;
long UnusedBuckets = 0;
ShortestBucket = std::min(ThisBucketSize, ShortestBucket);
UsedBuckets += ThisBucketSize;
}
- cout << _("Pkg Hashtable stats:") << endl;
- cout << _("Number of buckets: ") << SizeToStr(NumBuckets) << endl;
- cout << _("Unused buckets: ") << SizeToStr(UnusedBuckets) << endl;
- cout << _("Used buckets: ") << UsedBuckets << endl;
- cout << _("Average num entries per bucket : ") << UsedBuckets/(double)NumBuckets << endl;
- cout << _("Longest / Shortest bucket: ") << LongestBucket << " / " << ShortestBucket << endl;
-
- // get the hash collisions average
+ cout << "Total PkgHashTable buckets: " << SizeToStr(NumBuckets) << std::endl;
+ cout << " Unused: " << SizeToStr(UnusedBuckets) << std::endl;
+ cout << " Used: " << UsedBuckets << std::endl;
+ cout << " Average entries: " << UsedBuckets/(double)NumBuckets << std::endl;
+ cout << " Longest: " << LongestBucket << std::endl;
+ cout << " Shortest: " << ShortestBucket << std::endl;
+
+ // hashtable stats for the GrpHashTable
NumBuckets = sizeof(Cache->HeaderP->GrpHashTable)/sizeof(map_ptrloc);
UsedBuckets = 0;
UnusedBuckets = 0;
ShortestBucket = std::min(ThisBucketSize, ShortestBucket);
UsedBuckets += ThisBucketSize;
}
- cout << _("Grp Hashtable stats:") << endl;
- cout << _("Number of buckets: ") << SizeToStr(NumBuckets) << endl;
- cout << _("Unused buckets: ") << SizeToStr(UnusedBuckets) << endl;
- cout << _("Used buckets: ") << UsedBuckets << endl;
- cout << _("Average num entries per bucket : ") << UsedBuckets/(double)NumBuckets << endl;
- cout << _("Longest / Shortest bucket: ") << LongestBucket << " / " << ShortestBucket << endl;
+ cout << "Total GrpHashTable buckets: " << SizeToStr(NumBuckets) << std::endl;
+ cout << " Unused: " << SizeToStr(UnusedBuckets) << std::endl;
+ cout << " Used: " << UsedBuckets << std::endl;
+ cout << " Average entries: " << UsedBuckets/(double)NumBuckets << std::endl;
+ cout << " Longest: " << LongestBucket << std::endl;
+ cout << " Shortest: " << ShortestBucket << std::endl;
return true;
}