Remove backoff on scrape failure.

Having metrics with variable timestamps inconsistently
spaced when things fail will make it harder to write correct rules.

Update status page, requires some refactoring to insert a function.

Change-Id: Ie1c586cca53b8f3b318af8c21c418873063738a8
Merge "Remove backoff on scrape failure."
Make metrics exported by the Prometheus server itself more consistent.

- Always spell out the time unit (e.g. milliseconds instead of ms).

- Remove "_total" from the names of metrics that are not counters.

- Make use of the "Namespace" and "Subsystem" fields in the options.

- Removed the "capacity" facet from all metrics about channels/queues.
  These are all fixed via command line flags and will never change
  during the runtime of a process. Also, they should not be part of
  the same metric family. I have added separate metrics for the
  capacity of queues as convenience. (They will never change and are
  only set once.)

- I left "metric_disk_latency_microseconds" unchanged, although that
  metric measures the latency of the storage device, even if it is not
  a spinning disk. "SSD" is read by many as "solid state disk", so
  it's not too far off. (It should be "solid state drive", of course,
  but "metric_drive_latency_microseconds" is probably confusing.)

- Brian suggested to not mix "failure" and "success" outcome in the
  same metric family (distinguished by labels). For now, I left it as
  it is. We are touching some bigger issue here, especially as other
  parts in the Prometheus ecosystem are following the same
  principle. We still need to come to terms here and then change
  things consistently everywhere.

Change-Id: If799458b450d18f78500f05990301c12525197d3
Implement topk() and bottomk() functions.

To achieve O(log n * k) runtime, this uses a heap to track the current
bottom-k or top-k elements while iterating over the full set of
available elements.

It would be possible to reuse more code between topk and bottomk, but I
decided for some more duplication for the sake of clarity.

This fixes https://github.com/prometheus/prometheus/issues/399

Change-Id: I7487ddaadbe7acb22ca2cf2283ba6e7915f2b336
Add more topk() / bottomk() tests.

Test what happens if k > number of input elements.

Change-Id: Ie724b850939e297ebf085f0a5a3522e9cfcc6534
Add function to drop common labels in a vector.

This fixes https://github.com/prometheus/prometheus/issues/384.

Change-Id: I2973c4baeb8a4618ec3875fb11c6fcf5d111784b
Update used Go version to 1.3.

Go downloads moved to a different URL and require following redirects
(curl's '-L' option) now.

Go 1.3 deliberately randomizes ranges over maps, which uncovered some
bugs in our tests. These are fixed too.

Change-Id: Id2d9e185d8d2379a9b7b8ad5ba680024565d15f4
Merge "Update used Go version to 1.3."
Prometheus version 0.7.0.

Change-Id: I73468f72b43654f4bf57627c2f49fe802b18f637
NG Storage experiments.

Change-Id: Ifb8709960dbedd1d9f5efd88cdd359ee9fa9d26d
Checkpoint.

Change-Id: I9ec579b05199fa7a49d344e05c123d92abb745ed
Channel-based value copying.

Change-Id: I3cfafbfe0584ffa66a7592934fea0aa10b1e70e6
Split up ng storage into multiple files.

Change-Id: I125ebad4fd1a0106b609c0b42627a77c4037dc49
Checkpoint

Change-Id: Iee0d2a314591aebd45e0b36f8dcb8b17abe21d4a
Working GetValueAtTime().

Change-Id: I0f37ede1aa305a21eaf2d19b36a6d13c18b90804
Implement more getter methods.

Change-Id: I240a1004ceb711bd96340154a172e98c907a4387
First query layer integration for ng-storage.

Change-Id: I32a78888bbf840c8b2140dcdc9c286111600c8eb
Instrumentation and memory flushing.

Change-Id: I9aa1a6242228a624bf002ce55948d13ce176b669
Beginning of disk storage.

Change-Id: Ic2f353b48a7bc58700ba62bb6115bd1726060142
chunks.go -> chunk.go

Change-Id: I01786dc6e2cf9b10fc5ffae82f48dfda5caca7c5