code: protected void addThreadMetrics(Collection<Metric<?>> result) {
          ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean();
          result.add(new Metric<>("threads.peak", (long) threadMxBean.getPeakThreadCount()));
          result.add(new Metric<>("threads.daemon", (long) threadMxBean.getDaemonThreadCount()));
          result.add(new Metric<>("threads.totalStarted", threadMxBean.getTotalStartedThreadCount()));
          result.add(new Metric<>("threads", (long) threadMxBean.getThreadCount()));
      }
docs: Add thread metrics.
  
  @param result the result