Added more scrape information to tracker info.

This commit is contained in:
Jari Sundell
2011-11-07 21:34:06 +09:00
parent 575968b291
commit f4c3758dcd
3 changed files with 11 additions and 5 deletions
+4 -2
View File
@@ -72,12 +72,14 @@ initialize_command_tracker() {
CMD2_TRACKER ("t.min_interval", std::bind(&torrent::Tracker::min_interval, std::placeholders::_1));
CMD2_TRACKER ("t.success_time_last", std::bind(&torrent::Tracker::success_time_last, std::placeholders::_1));
CMD2_TRACKER ("t.failed_time_last", std::bind(&torrent::Tracker::failed_time_last, std::placeholders::_1));
CMD2_TRACKER ("t.success_counter", std::bind(&torrent::Tracker::success_counter, std::placeholders::_1));
CMD2_TRACKER ("t.failed_time_last", std::bind(&torrent::Tracker::failed_time_last, std::placeholders::_1));
CMD2_TRACKER ("t.failed_counter", std::bind(&torrent::Tracker::failed_counter, std::placeholders::_1));
CMD2_TRACKER ("t.scrape_time_last", std::bind(&torrent::Tracker::scrape_time_last, std::placeholders::_1));
CMD2_TRACKER ("t.scrape_counter", std::bind(&torrent::Tracker::scrape_counter, std::placeholders::_1));
CMD2_TRACKER ("t.scrape_complete", std::bind(&torrent::Tracker::scrape_complete, std::placeholders::_1));
CMD2_TRACKER ("t.scrape_incomplete", std::bind(&torrent::Tracker::scrape_incomplete, std::placeholders::_1));
CMD2_TRACKER ("t.scrape_downloaded", std::bind(&torrent::Tracker::scrape_downloaded, std::placeholders::_1));
+3 -1
View File
@@ -76,6 +76,8 @@
#include "poll_manager_select.h"
#include "view.h"
namespace std { using namespace tr1; }
namespace core {
void
@@ -204,7 +206,7 @@ Manager::get_address_throttle(const sockaddr* addr) {
// Most of this should be possible to move out.
void
Manager::initialize_second() {
torrent::Http::set_factory(sigc::mem_fun(m_httpStack, &CurlStack::new_object));
torrent::Http::set_factory(std::bind(&CurlStack::new_object, m_httpStack));
m_httpQueue->slot_factory(sigc::mem_fun(m_httpStack, &CurlStack::new_object));
CurlStack::global_init();
+4 -2
View File
@@ -89,14 +89,16 @@ WindowTrackerList::redraw() {
tracker->url().c_str());
if (pos < m_canvas->height())
m_canvas->print(4, pos++, "Id: %s Failed: %u/%u Enabled: %s Open: %s S/L: %u/%u",
m_canvas->print(4, pos++, "Id: %s Counters: %uf / %us (%u) Enabled: %s Open: %s S/L/D: %u/%u/%u",
rak::copy_escape_html(tracker->tracker_id()).c_str(),
tracker->failed_counter(),
tracker->success_counter(),
tracker->scrape_counter(),
tracker->is_usable() ? "yes" : tracker->is_enabled() ? "off" : " no",
tracker->is_busy() ? "yes" : " no",
tracker->scrape_complete(),
tracker->scrape_incomplete());
tracker->scrape_incomplete(),
tracker->scrape_downloaded());
// 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(),