code: public static void gcInfo(final Map<String, Object> infos) {
          List<GarbageCollectorMXBean> mxBeans = ManagementFactory.getGarbageCollectorMXBeans();
  
          for (GarbageCollectorMXBean mxBean : mxBeans) {
              infos.put("gc." + mxBean.getName().toLowerCase() + ".collectionCount", mxBean.getCollectionCount());
              infos.put("gc." + mxBean.getName().toLowerCase() + ".collectionTime", mxBean.getCollectionTime());
          }
      }
docs: Collects system information as delivered from the {@link GarbageCollectorMXBean}.
  
  @param infos a map where the infos are passed in.