code: public long getCounter(final String iStatName) {
      if (iStatName == null)
        return -1;
  
      // CHECK IF STATISTICS ARE ACTIVED
      if (recording < 0)
        return -1;
  
      synchronized (counters) {
        Long stat = counters.get(iStatName);
  
        if (stat == null)
          return -1;
  
        return stat.longValue();
      }
    }
docs: /*
  (non-Javadoc)
  
  @see com.orientechnologies.common.profiler.ProfileMBean#getStatistic(java.lang.String)