mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
dht: show usage at the end, print max store size
This commit is contained in:
1 parent
af0a30c9c5
commit
ffbb9e23ef
1 file changed
+6
-5
+6
-5
@@ -1585,11 +1585,6 @@ Dht::getStorageLog() const
|
||||
std::stringstream out;
|
||||
for (const auto& s : store)
|
||||
out << printStorageLog(s);
|
||||
out << "Total " << store.size() << " storages, " << total_values << " values (";
|
||||
if (total_store_size < 1024)
|
||||
out << total_store_size << " bytes)";
|
||||
else
|
||||
out << (total_store_size/1024) << " KB)";
|
||||
out << std::endl << std::endl;
|
||||
std::multimap<size_t, const SockAddr*> q_map;
|
||||
for (const auto& ip : store_quota)
|
||||
@@ -1598,6 +1593,12 @@ Dht::getStorageLog() const
|
||||
for (auto ip = q_map.rbegin(); ip != q_map.rend(); ++ip)
|
||||
out << "IP " << ip->second->toString() << " uses " << ip->first << " bytes" << std::endl;
|
||||
out << std::endl;
|
||||
out << "Total " << store.size() << " storages, " << total_values << " values (";
|
||||
if (total_store_size < 1024)
|
||||
out << total_store_size << " bytes)";
|
||||
else
|
||||
out << (total_store_size/1024) << " / " << (max_store_size/1024) << " KB)";
|
||||
out << std::endl;
|
||||
return out.str();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user