code: public static List<StatsMetric> sessionStatsMetrics() {
          stats_metric_vector v = libtorrent.session_stats_metrics();
          int size = (int) v.size();
  
          ArrayList<StatsMetric> l = new ArrayList<>(size);
  
          for (int i = 0; i < size; i++) {
              l.add(new StatsMetric(v.get(i)));
          }
  
          return l;
      }
docs: 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()).
  
  @return the list of all metrics