The Skip List uses reverse sorting due to peculiarities in the
implementation with respect to seeking.  This can be possibly simplified.
I would rather leave simplifying this as a TODO.

The in-memory arena needs the ForEach support, too.
Am 17.02.2013 19:03 schrieb "juliusv" <notifications@github.com>:

> In storage/metric/memory/memory.go:
>
> > +	if iterator == nil {
> > +		return
> > +	}
> > +
> > +	foundTime := time.Time(iterator.Key().(skipListTime))
> > +	if foundTime.Equal(t) {
> > +		sample = &model.Sample{
> > +			Metric:    m,
> > +			Value:     iterator.Value().(model.SampleValue),
> > +			Timestamp: t,
> > +		}
> > +
> > +		return
> > +	}
> > +
> > +	if t.Sub(foundTime) > p.DeltaAllowance {
>
> Since foundTime > t, shouldn't it be the other way around:
>
> foundTime.Sub(t)
>
>  —
> Reply to this email directly or view it on GitHub<https://github.com/prometheus/prometheus/pull/79/files#r3042835>.
>
>