Added counter for new peers each tracker received last request.

This commit is contained in:
Jari Sundell
2011-11-28 02:25:48 +09:00
parent 6c10f7e05d
commit 2be9a874c7
2 changed files with 6 additions and 2 deletions
+3
View File
@@ -66,6 +66,9 @@ initialize_command_tracker() {
CMD2_TRACKER ("t.type", std::bind(&torrent::Tracker::type, std::placeholders::_1));
CMD2_TRACKER ("t.id", std::bind(&torrent::Tracker::tracker_id, std::placeholders::_1));
CMD2_TRACKER ("t.latest_event", std::bind(&torrent::Tracker::latest_event, std::placeholders::_1));
CMD2_TRACKER ("t.latest_new_peers", std::bind(&torrent::Tracker::latest_new_peers, std::placeholders::_1));
// Time since last connection, connection attempt.
CMD2_TRACKER ("t.normal_interval", std::bind(&torrent::Tracker::normal_interval, std::placeholders::_1));
+3 -2
View File
@@ -89,7 +89,7 @@ WindowTrackerList::redraw() {
tracker->url().c_str());
if (pos < m_canvas->height())
m_canvas->print(4, pos++, "Id: %s Counters: %uf / %us (%u) Enabled: %s Open: %s S/L/D: %u/%u/%u",
m_canvas->print(4, pos++, "Id: %s Counters: %uf / %us (%u) Enabled: %s Open: %s S/L/D: %u/%u/%u (%u)",
rak::copy_escape_html(tracker->tracker_id()).c_str(),
tracker->failed_counter(),
tracker->success_counter(),
@@ -98,7 +98,8 @@ WindowTrackerList::redraw() {
tracker->is_busy() ? "yes" : " no",
tracker->scrape_complete(),
tracker->scrape_incomplete(),
tracker->scrape_downloaded());
tracker->scrape_downloaded(),
tracker->latest_new_peers());
// m_canvas->print(4, pos++, "Id: %s Focus: %s Enabled: %s Open: %s Timer: %u/%u",
// rak::copy_escape_html(tracker->tracker_id()).c_str(),