diff --git a/docs/manual.rst b/docs/manual.rst index d044a9516..e386ff290 100644 --- a/docs/manual.rst +++ b/docs/manual.rst @@ -1061,8 +1061,7 @@ session statistics ================== libtorrent provides a mechanism to query performance and statistics counters -from its internals. This is primarily useful for troubleshooting of production -systems and performance tuning. +from its internals. The statistics consists of two fundamental types. *counters* and *gauges*. A counter is a monotonically increasing value, incremented every time some event diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index 0838aa0fc..b7a583568 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -652,8 +652,10 @@ namespace aux { } #if TORRENT_ABI_VERSION == 1 +#include "libtorrent/aux_/disable_warnings_push.hpp" session_status status() const; peer_id deprecated_get_peer_id() const; +#include "libtorrent/aux_/disable_warnings_pop.hpp" #endif void get_cache_info(torrent_handle h, cache_status* ret, int flags) const; diff --git a/include/libtorrent/session_handle.hpp b/include/libtorrent/session_handle.hpp index 52b7be801..b1af3de5d 100644 --- a/include/libtorrent/session_handle.hpp +++ b/include/libtorrent/session_handle.hpp @@ -308,12 +308,16 @@ namespace libtorrent { TORRENT_DEPRECATED void set_load_function(user_load_function_t fun); +#include "libtorrent/aux_/disable_warnings_push.hpp" + // deprecated in libtorrent 1.1, use performance_counters instead // returns session wide-statistics and status. For more information, see // the ``session_status`` struct. TORRENT_DEPRECATED session_status status() const; +#include "libtorrent/aux_/disable_warnings_pop.hpp" + // deprecated in libtorrent 1.1 // fills out the supplied vector with information for each piece that is // currently in the disk cache for the torrent with the specified diff --git a/include/libtorrent/session_status.hpp b/include/libtorrent/session_status.hpp index b26e02fcc..6dff3d748 100644 --- a/include/libtorrent/session_status.hpp +++ b/include/libtorrent/session_status.hpp @@ -34,6 +34,7 @@ POSSIBILITY OF SUCH DAMAGE. #define TORRENT_SESSION_STATUS_HPP_INCLUDED #include "libtorrent/config.hpp" +#include "libtorrent/aux_/export.hpp" #include #if TORRENT_ABI_VERSION == 1 @@ -47,7 +48,7 @@ namespace libtorrent { // holds counters and gauges for the uTP sockets // deprecated in 1.1 in favor of session_stats counters, which is a more // flexible, extensible and performant mechanism for stats. - struct TORRENT_EXPORT utp_status + struct TORRENT_DEPRECATED_EXPORT utp_status { // gauges. These are snapshots of the number of // uTP sockets in each respective state @@ -76,7 +77,7 @@ namespace libtorrent { // contains session wide state and counters // deprecated in 1.1 in favor of session_stats counters, which is a more // flexible, extensible and performant mechanism for stats. - struct TORRENT_EXPORT session_status + struct TORRENT_DEPRECATED_EXPORT session_status { // false as long as no incoming connections have been // established on the listening socket. Every time you change the listen port, this will @@ -212,9 +213,13 @@ namespace libtorrent { // by the DHT. int dht_total_allocations; +#include "libtorrent/aux_/disable_warnings_push.hpp" + // statistics on the uTP sockets. utp_status utp_stats; +#include "libtorrent/aux_/disable_warnings_pop.hpp" + // the number of known peers across all torrents. These are not necessarily // connected peers, just peers we know of. int peerlist_size;