Commit graph

654 commits

Author SHA1 Message Date
juliusv 516101f015 Merge pull request #250 from prometheus/refactor/drop-unused-storage-setting
Drop unused writeMemoryInterval
2013-05-14 08:45:59 -07:00
juliusv 9ff00b651d Merge pull request #251 from prometheus/fix/memory-metric-mutability
Fix GetMetricForFingerprint() metric mutability.
2013-05-14 08:12:45 -07:00
Bernerd Schaefer 63d9988b9c Drop unused writeMemoryInterval 2013-05-14 17:03:03 +02:00
Bernerd Schaefer aa96c7d141 Fix rules_test.go
This is smelly, but for now we copy a helper method from the metric
tests into rules.
2013-05-14 16:55:18 +02:00
Julius Volz 83c60ad43a Fix GetMetricForFingerprint() metric mutability.
Some users of GetMetricForFingerprint() end up modifying the returned metric
labelset. Since the memory storage's implementation of
GetMetricForFingerprint() returned a pointer to the metric (and maps are
reference types anyways), the external mutation propagated back into the memory
storage.

The fix is to make a copy of the metric before returning it.
2013-05-14 16:46:30 +02:00
Matt T. Proud dab017e8cf Merge pull request #249 from prometheus/fix/test-flag-pollution
Rename test helper files to helpers_test.go
2013-05-14 07:33:03 -07:00
Bernerd Schaefer 428d91c86f Rename test helper files to helpers_test.go
This ensures that these files are properly included only in testing.
2013-05-14 16:30:47 +02:00
juliusv 98e512d755 Merge pull request #246 from prometheus/fix/interval-value-extraction
Fix and optimize getValuesAtIntervalOp data extraction.
2013-05-14 05:55:22 -07:00
Matt T. Proud 23a85654c7 Merge pull request #247 from prometheus/feature/database-statistics-exposition
Include forgotten databases.html.
2013-05-14 05:54:32 -07:00
Matt T. Proud 1a95406b81 Include forgotten databases.html. 2013-05-14 14:50:54 +02:00
Matt T. Proud 9a8fb58fa6 Merge pull request #245 from prometheus/feature/runtime/go1.1
¡ DONOTMERGE — Update to go1.1. !
2013-05-14 05:37:18 -07:00
Julius Volz 71a3172abb Fix and optimize getValuesAtIntervalOp data extraction.
- only the data extracted in the last loop iteration of ExtractSamples() was
  emitted as output
- if e.g. op interval < sample interval, there were situations where the same
  sample was added multiple times to the output
2013-05-14 13:55:17 +02:00
Matt T. Proud 8956ebe0c6 Include "Travis Helper". 2013-05-14 13:39:52 +02:00
Matt T. Proud 244a4a9cdb Update to go1.1.
This commit updates the documentation, Makefiles, formatting, and
code semantics to support the 1.1. runtime, which includes ...

1. ``make advice``,

2. ``make format``, and

3. ``go fix`` on various targets.
2013-05-14 12:39:08 +02:00
Matt T. Proud 2ea2e89c97 Merge pull request #244 from prometheus/feature/database-statistics-exposition
Simplify compaction and expose database sizes.
2013-05-14 03:31:15 -07:00
Matt T. Proud b224251981 Simplify compaction and expose database sizes.
This commit simplifies the way that compactions across a database's
keyspace occur due to reading the LevelDB internals. Secondarily it
introduces the database size estimation mechanisms.

Include database health and help interfaces.

Add database statistics; remove status goroutines.

This commit kills the use of Go routines to expose status throughout
the web components of Prometheus. It also dumps raw LevelDB status
on a separate /databases endpoint.
2013-05-14 12:29:53 +02:00
juliusv 92ad65ff13 Merge pull request #232 from prometheus/optimize/granular-storage-locking
Synchronous memory appends and more fine-grained storage locks.
2013-05-13 10:11:57 -07:00
Matt T. Proud dad20c15e7 Merge pull request #243 from prometheus/feature/size-exposition
Simplify compaction and expose database sizes.
2013-05-13 04:19:28 -07:00
Matt T. Proud 1f7f89b4e3 Simplify compaction and expose database sizes.
This commit simplifies the way that compactions across a database's
keyspace occur due to reading the LevelDB internals.  Secondarily it
introduces the database size estimation mechanisms.
2013-05-13 13:15:35 +02:00
Matt T. Proud 5b183f6434 Merge pull request #242 from prometheus/feature/storage/long-tail-deletion
Include long-tail data deletion mechanism.
2013-05-13 02:05:44 -07:00
Matt T. Proud d538b0382f Include long-tail data deletion mechanism.
This commit introduces the long-tail deletion mechanism, which will
automatically cull old sample values.  It is an acceptable
hold-over until we get a resampling pipeline implemented.

Kill legacy OS X documentation, too.
2013-05-13 10:54:36 +02:00
Julius Volz ce1ee444f1 Synchronous memory appends and more fine-grained storage locks.
This does two things:

1) Make TieredStorage.AppendSamples() write directly to memory instead of
   buffering to a channel first. This is needed in cases where a rule might
   immediately need the data generated by a previous rule.

2) Replace the single storage mutex by two new ones:
   - memoryMutex - needs to be locked at any time that two concurrent
                   goroutines could be accessing (via read or write) the
                   TieredStorage memoryArena.
   - memoryDeleteMutex - used to prevent any deletion of samples from
                         memoryArena as long as renderView is running and
                         assembling data from it.
   The LevelDB disk storage does not need to be protected by a mutex when
   rendering a view since renderView works off a LevelDB snapshot.

The rationale against adding memoryMutex directly to the memory storage: taking
a mutex does come with a small inherent time cost, and taking it is only
required in few places. In fact, no locking is required for the memory storage
instance which is part of a view (and not the TieredStorage).
2013-05-10 17:15:52 +02:00
Matt T. Proud 2a047fe416 Merge pull request #236 from prometheus/feature/tools/compactor
Expose interfaces for pruner and make pruner tool.
2013-05-10 08:09:04 -07:00
Matt T. Proud fa6a1f97d0 Expose interfaces for pruner and make pruner tool.
In order to run database cleanups and diagnostics, we should have
a means for pruning a database---even if LevelDB does this for us.
2013-05-10 17:07:03 +02:00
juliusv 76521c3ff0 Merge pull request #234 from prometheus/feature/storage/long-tail-deletion
Include deletion processor for long-tail values.
2013-05-10 03:26:13 -07:00
Matt T. Proud 161c8fbf9b Include deletion processor for long-tail values.
This commit extracts the model.Values truncation behavior into the actual
tiered storage, which uses it and behaves in a peculiar way—notably the
retention of previous elements if the chunk were to ever go empty.  This is
done to enable interpolation between sparse sample values in the evaluation
cycle.  Nothing necessarily new here—just an extraction.

Now, the model.Values TruncateBefore functionality would do what a user
would expect without any surprises, which is required for the
DeletionProcessor, which may decide to split a large chunk in two if it
determines that the chunk contains the cut-off time.
2013-05-10 12:19:12 +02:00
juliusv 8d062ebb27 Merge pull request #219 from prometheus/refactor/version-protocol-buffer
Include generated Protocol Buffers artifacts.
2013-05-09 12:29:42 -07:00
juliusv 0dc15d28cb Merge pull request #233 from prometheus/feature/count-by
Implement a COUNT ... BY aggregation operator.
2013-05-09 12:26:31 -07:00
Matt T. Proud 38d839d810 Include generated Protocol Buffers artifacts.
This commit reduces the general compile time dependencies to omit
the Protocol Buffer compiler and the Go Protocol Buffer generator
tool.  The build steps to furnish them still remain, but they can
optionally be called if data.proto or config.proto are under work.
2013-05-08 21:16:39 +02:00
Julius Volz 0877680761 Implement a COUNT ... BY aggregation operator.
This also removes the now obsolete scalar count() function and corrects the
expressions test naming (broken in
2202cd71c9 (L6R59))
so that the expression tests will actually run.
2013-05-08 16:35:16 +02:00
Bernerd Schaefer 1c9b5b6b8d Merge pull request #221 from prometheus/fix/race-conditions
Fix/document race conditions
2013-05-07 09:20:16 -07:00
Bernerd Schaefer a07b89d411 Document go-1.1 race detector with prometheus 2013-05-07 18:15:17 +02:00
Bernerd Schaefer cdde766f39 Embed mutex on web status handler 2013-05-07 18:15:17 +02:00
Bernerd Schaefer 7740167654 Add comments about potential race conditions 2013-05-07 18:15:17 +02:00
Bernerd Schaefer 9183302b1f Web handler returns 404 for favicon requests 2013-05-07 18:15:17 +02:00
Bernerd Schaefer b886a14cfc Remove race conditions from UncertaintyGroup 2013-05-07 18:15:16 +02:00
Matt T. Proud 7f548a4297 Merge pull request #228 from prometheus/feature/storage/compaction
Schedule the background compactors to run.
2013-05-07 08:50:01 -07:00
Matt Proud 7f0d816574 Schedule the background compactors to run.
This commit introduces three background compactors, which compact
sparse samples together.

1. Older than five minutes is grouped together into chunks of 50 every 30
   minutes.

2. Older than 60 minutes is grouped together into chunks of 250 every 50
   minutes.

3. Older than one day is grouped together into chunks of 5000 every 70
   minutes.
2013-05-07 17:14:04 +02:00
juliusv 6551356af4 Merge pull request #227 from prometheus/fix/build-errors
Fix build errors and add default build step to "make".
2013-05-07 06:55:05 -07:00
Julius Volz af7920126c Fix build errors and add default build step to "make". 2013-05-07 15:54:41 +02:00
juliusv 984fd7c184 Merge pull request #226 from prometheus/refactor/repointerize-tiered-storage
Repointerize TieredStorage method receiver types.
2013-05-07 06:21:33 -07:00
Julius Volz caab131ada Repointerize TieredStorage method receiver types. 2013-05-07 15:12:33 +02:00
juliusv f1a634f580 Merge pull request #224 from prometheus/refactor/non-global-storage
Make AST query storage non-global.
2013-05-07 04:27:41 -07:00
juliusv 89de116ea9 Merge pull request #225 from prometheus/refactor/fmt-cleanups
Slice expression simplifications.
2013-05-07 04:27:27 -07:00
Julius Volz 05afa970d2 Slice expression simplifications. 2013-05-07 13:22:29 +02:00
Julius Volz 56324d8ce2 Make AST query storage non-global. 2013-05-07 13:15:10 +02:00
Matt T. Proud 76dad4307d Merge pull request #223 from prometheus/feature/refactor/storage-exposition
Expose TieredStorage.DiskStorage.
2013-05-07 03:35:01 -07:00
Matt T. Proud f897164bcf Expose TieredStorage.DiskStorage. 2013-05-07 10:26:28 +02:00
Matt T. Proud 4872ec7577 Merge pull request #218 from prometheus/refactor/directory-structure
Make Web Serving Stack's Dependencies Concrete
2013-05-06 02:15:41 -07:00
Matt T. Proud 3b9b1c6ab4 Define dependencies for web. stack concretely.
This commit destroys the use of AppState, which makes passing
concrete state along to various serving components onerous.
2013-05-06 11:13:12 +02:00