Merge pull request #67 from aldenml/remove-bandwidth-limit-logging

Removed unused flag bandwidth-limit-logging and related code.
This commit is contained in:
Arvid Norberg 2015-08-05 00:19:06 -04:00
commit fe3a8139d7
4 changed files with 2 additions and 31 deletions

View File

@ -441,9 +441,6 @@ feature piece-allocator : valloc memalign posix_memalign : composite propagated
feature.compose <piece-allocator>memalign : <define>TORRENT_USE_MEMALIGN=1 ;
feature.compose <piece-allocator>posix_memalign : <define>TORRENT_USE_POSIX_MEMALIGN=1 ;
feature bandwidth-limit-logging : off on : composite propagated link-incompatible ;
feature.compose <bandwidth-limit-logging>on : <define>TORRENT_VERBOSE_BANDWIDTH_LIMIT ;
feature invariant-checks : on off full : composite propagated link-incompatible ;
feature.compose <invariant-checks>off : <define>TORRENT_DISABLE_INVARIANT_CHECKS ;
feature.compose <invariant-checks>full : <define>TORRENT_EXPENSIVE_INVARIANT_CHECKS ;

View File

@ -39,10 +39,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/aux_/disable_warnings_pop.hpp"
#ifdef TORRENT_VERBOSE_BANDWIDTH_LIMIT
#include <fstream>
#endif
#include "libtorrent/socket.hpp"
#include "libtorrent/error_code.hpp"
#include "libtorrent/invariant_check.hpp"
@ -57,11 +53,7 @@ namespace libtorrent {
struct TORRENT_EXTRA_EXPORT bandwidth_manager
{
bandwidth_manager(int channel
#ifdef TORRENT_VERBOSE_BANDWIDTH_LIMIT
, bool log = false
#endif
);
bandwidth_manager(int channel);
void close();
@ -99,11 +91,6 @@ private:
int m_channel;
bool m_abort;
#ifdef TORRENT_VERBOSE_BANDWIDTH_LIMIT
std::ofstream m_log;
time_point m_start;
#endif
};
}

View File

@ -36,20 +36,11 @@ POSSIBILITY OF SUCH DAMAGE.
namespace libtorrent
{
bandwidth_manager::bandwidth_manager(int channel
#ifdef TORRENT_VERBOSE_BANDWIDTH_LIMIT
, bool log
#endif
)
bandwidth_manager::bandwidth_manager(int channel)
: m_queued_bytes(0)
, m_channel(channel)
, m_abort(false)
{
#ifdef TORRENT_VERBOSE_BANDWIDTH_LIMIT
if (log)
m_log.open("bandwidth_limiter.log", std::ios::trunc);
m_start = aux::time_now();
#endif
}
void bandwidth_manager::close()

View File

@ -368,11 +368,7 @@ namespace aux {
, m_disk_thread(m_io_service, m_stats_counters
, (uncork_interface*)this)
, m_download_rate(peer_connection::download_channel)
#ifdef TORRENT_VERBOSE_BANDWIDTH_LIMIT
, m_upload_rate(peer_connection::upload_channel, true)
#else
, m_upload_rate(peer_connection::upload_channel)
#endif
, m_global_class(0)
, m_tcp_peer_class(0)
, m_local_peer_class(0)