prometheus/storage/remote
beorn7 7a8bb8222c Style cleanup of all the changes in sparsehistogram so far
A lot of this code was hacked together, literally during a
hackathon. This commit intends not to change the code substantially,
but just make the code obey the usual style practices.

A (possibly incomplete) list of areas:

* Generally address linter warnings.

* The `pgk` directory is deprecated as per dev-summit. No new packages should
  be added to it. I moved the new `pkg/histogram` package to `model`
  anticipating what's proposed in #9478.

* Make the naming of the Sparse Histogram more consistent. Including
  abbreviations, there were just too many names for it: SparseHistogram,
  Histogram, Histo, hist, his, shs, h. The idea is to call it "Histogram" in
  general. Only add "Sparse" if it is needed to avoid confusion with
  conventional Histograms (which is rare because the TSDB really has no notion
  of conventional Histograms). Use abbreviations only in local scope, and then
  really abbreviate (not just removing three out of seven letters like in
  "Histo"). This is in the spirit of
  https://github.com/golang/go/wiki/CodeReviewComments#variable-names

* Several other minor name changes.

* A lot of formatting of doc comments. For one, following
  https://github.com/golang/go/wiki/CodeReviewComments#comment-sentences
  , but also layout question, anticipating how things will look like
  when rendered by `godoc` (even where `godoc` doesn't render them
  right now because they are for unexported types or not a doc comment
  at all but just a normal code comment - consistency is queen!).

* Re-enabled `TestQueryLog` and `TestEndopints` (they pass now,
  leaving them disabled was presumably an oversight).

* Bucket iterator for histogram.Histogram is now created with a
  method.

* HistogramChunk.iterator now allows iterator recycling. (I think
  @dieterbe only commented it out because he was confused by the
  question in the comment.)

* HistogramAppender.Append panics now because we decided to treat
  staleness marker differently.

Signed-off-by: beorn7 <beorn@grafana.com>
2021-10-11 13:02:03 +02:00
..
chunked.go Fix some warnings: 'redundant type from array, slice, or map composite literal' (#7109) 2020-04-15 11:17:41 +01:00
chunked_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
client.go Enable HTTP2 again (#9398) 2021-09-26 23:16:12 +02:00
client_test.go tests: Move from t.Errorf and others. (Part 2) (#9309) 2021-09-13 21:19:20 +02:00
codec.go Style cleanup of all the changes in sparsehistogram so far 2021-10-11 13:02:03 +02:00
codec_test.go Add initial support for exemplar to the remote write receiver endpoint (#9319) 2021-09-21 14:53:27 -06:00
ewma.go Replace sync/atomic with uber-go/atomic (#7683) 2020-07-30 13:15:42 +05:30
intern.go Move away from testutil, refactor imports (#8087) 2020-10-22 11:00:08 +02:00
intern_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
max_timestamp.go Remote: Do not collect non-initialized timestamp metrics (#8060) 2020-10-15 23:53:59 +02:00
metadata_watcher.go Switched to go-kit/log 2021-06-11 12:28:36 -04:00
metadata_watcher_test.go Fix some gofmt warnings (#8743) 2021-04-22 08:43:30 -06:00
queue_manager.go Sync sparsehistogram branch with main (#9189) 2021-08-11 15:43:17 +05:30
queue_manager_test.go remove redundant type conversion (#9126) 2021-07-28 13:33:46 +05:30
read.go LabelNames API with matchers (#9083) 2021-07-20 18:08:08 +05:30
read_handler.go Switched to go-kit/log 2021-06-11 12:28:36 -04:00
read_handler_test.go tests: Move from t.Errorf and others. (Part 2) (#9309) 2021-09-13 21:19:20 +02:00
read_test.go Allow metric metadata to be propagated via Remote Write. (#6815) 2020-11-19 20:53:03 +05:30
storage.go Switched to go-kit/log 2021-06-11 12:28:36 -04:00
storage_test.go Allow metric metadata to be propagated via Remote Write. (#6815) 2020-11-19 20:53:03 +05:30
write.go Style cleanup of all the changes in sparsehistogram so far 2021-10-11 13:02:03 +02:00
write_handler.go Add initial support for exemplar to the remote write receiver endpoint (#9319) 2021-09-21 14:53:27 -06:00
write_handler_test.go Style cleanup of all the changes in sparsehistogram so far 2021-10-11 13:02:03 +02:00
write_test.go Allow metric metadata to be propagated via Remote Write. (#6815) 2020-11-19 20:53:03 +05:30