constructor(opts, registry) {
		super(opts, registry);
		this.type = METRIC.TYPE_HISTOGRAM;

		// Create buckets
		if (isPlainObject(opts.linearBuckets)) {
			this.buckets = HistogramMetric.generateLinearBuckets(
				opts.linearBuckets.start,
				opts.linearBuckets.width,
				opts.linearBuckets.count
			);
		} else if (isPlainObject(opts.exponentialBuckets)) {
			this.buckets = HistogramMetric.generateExponentialBuckets(
				opts.exponentialBuckets.start,
				opts.exponentialBuckets.factor,
				opts.exponentialBuckets.count
			);
		} else if (Array.isArray(opts.buckets)) {
			this.buckets = Array.from(opts.buckets);
		} else if (opts.buckets === true) {
			this.buckets = this.registry.opts.defaultBuckets;
		}
		if (this.buckets) {
			this.buckets.sort(sortAscending);
		}

		// Create quantiles
		if (Array.isArray(opts.quantiles)) {
			this.quantiles = Array.from(opts.quantiles);
		} else if (opts.quantiles === true) {
			this.quantiles = this.registry.opts.defaultQuantiles;
		}
		if (this.quantiles) {
			this.quantiles.sort(sortAscending);
			this.maxAgeSeconds = opts.maxAgeSeconds || this.registry.opts.defaultMaxAgeSeconds; // 1 minute
			this.ageBuckets = opts.ageBuckets || this.registry.opts.defaultAgeBuckets; // 10 secs per bucket
		}

		this.rate = opts.rate;
	}
Creates an instance of HistogramMetric.
@param {Object} opts
@param {MetricRegistry} registry
@memberof HistogramMetric