class InstrumentationService extends BaseService implements Instrumentation {

  @Override
  @SuppressWarnings("unchecked")
  public void init() throws ServiceException {
    timersSize = getServiceConfig().getInt(CONF_TIMERS_SIZE, 10);
    counterLock = new ReentrantLock();
    timerLock = new ReentrantLock();
    variableLock = new ReentrantLock();
    samplerLock = new ReentrantLock();
    Map<String, VariableHolder> jvmVariables =
        new ConcurrentHashMap<>();
    counters = new ConcurrentHashMap<>();
    timers = new ConcurrentHashMap<>();
    variables = new ConcurrentHashMap<>();
    samplers = new ConcurrentHashMap<>();
    samplersList = new ArrayList<>();
    all = new LinkedHashMap<>();
    all.put("os-env", System.getenv());
    all.put("sys-props", (Map<String, ?>) (Map) System.getProperties());
    all.put("jvm", jvmVariables);
    all.put("counters", (Map) counters);
    all.put("timers", (Map) timers);
    all.put("variables", (Map) variables);
    all.put("samplers", (Map) samplers);

    jvmVariables.put("free.memory",
        new VariableHolder<>(new Instrumentation.Variable<Long>() {
          @Override
          public Long getValue() {
            return Runtime.getRuntime().freeMemory();
          }
        }));
    jvmVariables.put("max.memory",
        new VariableHolder<>(new Instrumentation.Variable<Long>() {
          @Override
          public Long getValue() {
            return Runtime.getRuntime().maxMemory();
          }
        }));
    jvmVariables.put("total.memory",
        new VariableHolder<>(new Instrumentation.Variable<Long>() {
          @Override
          public Long getValue() {
            return Runtime.getRuntime().totalMemory();
          }
        }));
  }

  public  InstrumentationService();

}