Remove work-around that required copying all bytes of a scrape.

Now that the subtle bug in matttproud/golang_protobuf_extensions is
fixed, we do not need to copy the bytes of a scrape into a buffer
first before starting to parse it.

Change-Id: Ib73ecae16173ddd219cda56388a8f853332f8853
Fix console handler.

This was accidnetally broken in 2128d9d81196f92432c4016bccfeab3f7af3f06a.

Change-Id: I50ea1fdb8ae4d28ae4555410bee97e5037692aa5
Merge "Fix console handler."
Build prometheus tools as well

Change-Id: I49d5ca4d6ff715e8a6631caf052de309b91b0b1b
Expose path used to get to console to console.

Change-Id: I72386a2d4e53863da302ecc5c7e44d6c310197e0
Let consoles get graph links from experssions.

Rename ConsoleLinkFromExpression, as we now have consoles.

Change-Id: I7ed2c9c83863adb390b51121dd9736845f7bcdfc
Add 'tmpl', a 'template' for non-string literal names.

Change-Id: I6a03a5c5d20029cf414562efa7745ed6c53b2731
Fix HTTP connection leak upon non-OK status.

Change-Id: Ie7fbd7dcc089b8306b40631be3e3d736c23c1cd3
Add abs() and over-time aggregation functions.

This implements aggregation functions over time as request in
https://github.com/prometheus/prometheus/issues/383.

Change-Id: Ifd69b850de8cfdf6e7a6c0e042056fa4c672410e
Fix time() behavior.

time() should return the timestamp for which the query is executed, not
the actual current time.

Change-Id: I430a45cabad7785cd58f95b1028a71dff4c87710
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
WIP DB benchmarking tools

Change-Id: I3e12ee931aabc07b1d042fe373817b644e6aeaab