Commit Graph

23 Commits

Author SHA1 Message Date
Bryan Boreham
b085c80ef3 Decode via byte slice for memcache and file read
This is more efficient, since the decoder can read field names in-place.
It also appears to be absolutely faster.
2017-03-14 14:54:17 +00:00
Jonathan Lange
e8085b01b6 Use 'common' library 2016-12-07 11:22:38 +00:00
Tom Wilkie
21ee72a384 Add OpenTracing support to TimeRequestHistogram (#2023)
* Vendor open tracing

* Extend TimeRequestHistorgram to also emit opentracing spans.

* Update some of the labels
2016-11-22 14:43:15 +00:00
Tom Wilkie
32edfc9112 Don't reencode reports in the collector (#1819)
* Don't reencode reports in the collector

* Review feedback

* Fix comment

* Update alpine URLs so it will build

* Fix tests
2016-08-22 17:37:41 +01:00
Matthias Radestock
d6e5f0a154 allow more accurate reporting of memcache hit ratio
A lot of time could pass between recording the request count and hit
count pertaining to a particular report fetching batch, which skewed
calculations cache hit ratios.

Fix that by defering the request count recording to the end, which is
when we record the hit count.
2016-08-15 16:25:12 +01:00
Matthias Radestock
9cf178f130 fix MemcacheClient.FetchReports miss & leak on corrupt report
Problem: Decoding a corrupt report grows the 'missing' list. Since we
are waiting for 'len(keys)-len(missing)' decoder go-routines, this
results in waiting for fewer go-routines than we should. The surplus
go-routines leak and we ignore their reports. And since the keys of the
ignored reports are not included in 'missing', we won't attempt to fetch
them from S3 either. Oops.

Fix: calculate the number of go-routines once, at the beginning.
2016-08-15 10:44:29 +01:00
Jonathan Lange
a3648f0c89 Inline StoreBytes 2016-07-15 12:58:27 +01:00
Jonathan Lange
bbd75ddd24 Use memcache compression level from config 2016-07-15 11:24:37 +01:00
Jonathan Lange
1fd8a5fb88 Use StoreReport in main AWS routine 2016-07-15 11:24:37 +01:00
Jonathan Lange
270a55060f Add StoreReport methods to stores
Not sure if we'll use them.
2016-07-15 11:24:36 +01:00
Jonathan Lange
60e14c1dc2 Plumb through an option for compression 2016-07-15 11:24:36 +01:00
Tom Wilkie
3173f6ad75 Use histograms over summaries 2016-07-12 11:15:57 +01:00
Jonathan Lange
49f2e4e40c Count memcache requests even if they time out 2016-07-11 13:01:02 +01:00
Paul Bellamy
8cb1ecdf2c Merge pull request #1642 from weaveworks/refactoring-timing
refactor some timing helpers into a common lib
2016-07-05 13:01:28 +01:00
Paul Bellamy
7736564337 refactor some timing helpers into a common lib 2016-07-05 12:29:00 +01:00
Jonathan Lange
31c88fd62b Instrumentation that we might like to keep 2016-07-04 16:03:50 +01:00
Jonathan Lange
c1dab17fb3 Make expiration a Duration 2016-07-04 13:30:23 +01:00
Jonathan Lange
f7bdedc149 Config struct for memcache client 2016-07-04 13:25:45 +01:00
Jonathan Lange
96520d7a46 Fixes to memcache support (#1628)
* Fix errors discovered in dev

* Log an error rather than aborting when memcache doesn't resolve
* Initialize map correctly

* Review tweaks
2016-07-04 11:00:11 +01:00
Jonathan Lange
d984605de1 Write back to the in-process cache 2016-06-30 09:57:49 +01:00
Jonathan Lange
e2bda8f670 Move last memcache bits out of dynamo_collector 2016-06-30 09:55:03 +01:00
Julius Volz
4fa40e22b2 Rework Scope metrics according to Prometheus conventions. (#1615)
* Rework Scope metrics according to Prometheus conventions.

- counters should end with _total
- elaborated and added units to help strings
- recommended for cache hit/miss metrics: track only the total and the
  hits and in separate metrics, since the most common query will be
  "hits / total"
- track all times in seconds (base units), which has become the standard
  recommendation
- other small changes

There could be more changes that would require more thinking (what
dimensions to use, summaries vs. histograms, etc.), but this is probably
enough controversial material already :)

* Use timeRequestStatus() in sqs_control_router.go.
2016-06-30 09:12:25 +01:00
Jonathan Lange
47fcb52354 Optional memcached between probes and S3
If given settings for memcached, services will store & fetch reports
from memcache after checking their in-process cache but before fetching
from S3.
2016-06-22 18:40:50 +01:00