snapshot() {
		if (!this.dirty && this.lastSnapshot) return this.lastSnapshot;

		const samples = this.ringBuckets.reduce((a, b) => a.concat(b.samples), []);
		samples.sort(sortAscending);

		const mean = samples.length ? samples.reduce((a, b) => a + b, 0) / samples.length : null;
		const variance =
			samples.length > 1
				? samples.reduce((a, b) => a + Math.pow(b - mean, 2), 0) / (samples.length - 1)
				: null;
		const stdDev = variance ? Math.sqrt(variance) : null;

		this.lastSnapshot = {
			min: samples.length ? samples[0] : null,
			mean,
			variance,
			stdDev,
			max: samples.length ? samples[samples.length - 1] : null,
			quantiles: this.quantiles.reduce(
				(a, q) => setProp(a, q, samples[Math.ceil(q * samples.length) - 1]),
				{}
			)
		};

		this.clearDirty();

		return this.lastSnapshot;
	}
Generate a snapshot from buckets and calculate min, max, mean, quantiles, variance & StdDev.

@returns {Object}
@memberof TimeWindowQuantiles