| Version: | 2.0.5 |
|---|
Table of contents
Declared in "libtorrent/performance_counters.hpp"
struct counters
{
counters () ;
counters (counters const&) ;
counters& operator= (counters const&) & ;
std::int64_t operator[] (int i) const ;
std::int64_t inc_stats_counter (int c, std::int64_t value = 1) ;
void set_value (int c, std::int64_t value) ;
void blend_stats_counter (int c, std::int64_t value, int ratio) ;
};
[report issue]std::int64_t operator[] (int i) const ; std::int64_t inc_stats_counter (int c, std::int64_t value = 1) ;
returns the new value
[report issue]Declared in "libtorrent/session_stats.hpp"
describes one statistics metric from the session. For more information, see the session statistics section.
struct stats_metric
{
char const* name;
int value_index;
metric_type_t type;
};
[report issue]Declared in "libtorrent/session_stats.hpp"
std::vector<stats_metric> session_stats_metrics ();
This free function returns the list of available metrics exposed by libtorrent's statistics API. Each metric has a name and a value index. The value index is the index into the array in session_stats_alert where this metric's value can be found when the session stats is sampled (by calling post_session_stats()).
[report issue]Declared in "libtorrent/session_stats.hpp"
int find_metric_idx (string_view name);
given a name of a metric, this function returns the counter index of it, or -1 if it could not be found. The counter index is the index into the values array returned by session_stats_alert.
[report issue]Declared in "libtorrent/session_stats.hpp"
| name | value | description |
|---|---|---|
| counter | 0 | |
| gauge | 1 |