code: public ResourceModelStatistics countMappingDuration(int durationInMs) {
          // The right-hand interval boundaries are pre-calculated. We start at the smallest (1) of the
          // interval [0, 1). Thus, when our value is less than the boundary, we know it is in the current interval (i),
          // as the right-hand boundary is exclusive.
          for (int i = 0; i < this.indexBoundaries.length; ++i) {
              if (durationInMs < this.indexBoundaries[i]) {
                  ++this.mappingDurationFrequencies[i];
                  return this;
              }
          }
  
          // The mapping duration time exceeds the frequency table boundaries.
          // Fallback: count it as the longest possible duration
          ++this.mappingDurationFrequencies[this.mappingDurationFrequencies.length - 1];
          return this;
      }
docs: Adds the mapping with the duration to the statistics.
  
  @return this instance.