1. 22 8月, 2015 1 次提交
  2. 21 8月, 2015 1 次提交
  3. 16 7月, 2015 1 次提交
    • B
      storage: ensure timestamp monotonicity within series. · ff08f0b6
      beorn7 提交于
      Fixes https://github.com/prometheus/prometheus/issues/481
      
      While doing so, clean up and fix a few other things:
      
      - Fix `go vet` warnings (@fabxc to blame ;).
      
      - Fix a racey problem with unarchiving: Whenever we unarchive a
        series, we essentially want to do something with it. However, until
        we have done something with it, it appears like a series that is
        ready to be archived or even purged. So e.g. it would be ignored
        during checkpointing. With this fix, we always load the chunkDescs
        upon unarchiving. This is wasteful if we only want to add a new
        sample to an archived time series, but the (presumably more common)
        case where we access an archived time series in a query doesn't
        become more expensive.
      
      - The change above streamlined the getOrCreateSeries ond
        newMemorySeries flow. Also, the modTime is now always set correctly.
      
      - Fix the leveldb-backed implementation of KeyValueStore.Delete. It
        had the wrong behavior of still returning true, nil if a
        non-existing key has been passed in.
      ff08f0b6
  4. 13 7月, 2015 1 次提交
  5. 21 5月, 2015 1 次提交
  6. 20 5月, 2015 1 次提交
  7. 14 4月, 2015 1 次提交
    • B
      Improve chunk and chunkDesc loading. · b02d900e
      beorn7 提交于
      Also, clean up some things in the code (especially introduction of the
      chunkLenWithHeader constant to avoid the same expression all over the place).
      
      Benchmark results:
      
      BEFORE
      BenchmarkLoadChunksSequentially     5000            283580 ns/op          152143 B/op        312 allocs/op
      BenchmarkLoadChunksRandomly        20000             82936 ns/op           39310 B/op         99 allocs/op
      BenchmarkLoadChunkDescs            10000            110833 ns/op           15092 B/op        345 allocs/op
      
      AFTER
      BenchmarkLoadChunksSequentially    10000            146785 ns/op          152285 B/op        315 allocs/op
      BenchmarkLoadChunksRandomly        20000             67598 ns/op           39438 B/op        103 allocs/op
      BenchmarkLoadChunkDescs            20000             99631 ns/op           12636 B/op        192 allocs/op
      
      Note that everything is obviously loaded from the page cache (as the
      benchmark runs thousands of times with very small series files). In a
      real-world scenario, I expect a larger impact, as the disk operations
      will more often actually hit the disk. To load ~50 sequential chunks,
      this reduces the iops from 100 seeks and 100 reads to 1 seek and 1
      read.
      b02d900e
  8. 15 3月, 2015 1 次提交
    • B
      Improve various things around chunk encoding. · 5bea942d
      beorn7 提交于
      A number of mostly minor things:
      
      - Rename chunk type -> chunk encoding.
      
      - After all, do not carry around the chunk encoding to all parts of
        the system, but just have one place where the encoding for new
        chunks is set based on the flag. The new approach has caveats as
        well, but the polution of so many method signatures is worse.
      
      - Use the default chunk encoding for new chunks of existing
        series. (Previously, only new _series_ would get chunks with the
        default encoding.)
      
      - Use an enum for chunk encoding. (But keep the version number for the
        flag, for reasons discussed previously.)
      
      - Add encoding() to the chunk interface (so that a chunk knows its own
        encoding - no need to have that in a different top-level function).
      
      - Got rid of newFollowUpChunk (which would keep the existing encoding
        for all chunks of a time series). Now only use newChunk(), which
        will create a chunk encoding according to the flag.
      
      - Simplified transcodeAndAdd.
      
      - Reordered methods of deltaEncodedChunk and doubleDeltaEncoded chunk
        to match the order in the chunk interface.
      
      - Only transcode if the chunk is not yet half full. If more than half
        full, add a new chunk instead.
      5bea942d
  9. 07 3月, 2015 1 次提交
  10. 06 3月, 2015 2 次提交
  11. 22 1月, 2015 1 次提交
    • B
      Clean up license issues. · 5859b74f
      Bjoern Rabenstein 提交于
      - Move CONTRIBUTORS.md to the more common AUTHORS.
      - Added the required NOTICE file.
      - Changed "Prometheus Team" to "The Prometheus Authors".
      - Reverted the erroneous changes to the Apache License.
      5859b74f
  12. 26 11月, 2014 10 次提交
    • B
      Changes after pair code review. · 14bda418
      Bjoern Rabenstein 提交于
      Change-Id: Ib72d40f8e9027818cfbbd32a7a7201eebda07455
      14bda418
    • B
      Squash a number of TODOs. · 096fa0f8
      Bjoern Rabenstein 提交于
      - Staleness delta is no a proper function parameter and not replicated
        from package ast.
      
      - Named type 'chunks' replaced by explicit '[]chunk' to avoid confusion.
      
      - For the same reason, replaced 'chunkDescs' by '[]*chunkDescs'.
      
      - Verified that math.Modf is not a speed enhancement over conversion
        (actually 5x slower).
      
      - Renamed firstTimeField, lastTimeField into chunkFirstTime and
        chunkLastTime.
      
      - Verified unpin() is sufficiently goroutine-safe.
      
      - Decided not to update archivedFingerprintToTimeRange upon series
        truncation and added a rationale why.
      
      Change-Id: I863b8d785e5ad9f71eb63e229845eacf1bed8534
      096fa0f8
    • B
      More code cleanups. · 71206dbc
      Bjoern Rabenstein 提交于
      Add license text everywhere.
      And others....
      
      Change-Id: I11ccde267a2ef7eb366c4788ba7aeae14ba7545c
      71206dbc
    • B
      Major code cleanup. · f5f9f351
      Bjoern Rabenstein 提交于
      - Make it go-vet and golint clean.
      - Add comments, TODOs, etc.
      
      Change-Id: If1392d96f3d5b4cdde597b10c8dff1769fcfabe2
      f5f9f351
    • J
      Remove use of freelists for chunk bufs. · 8dfaa5ec
      Julius Volz 提交于
      Change-Id: Ib887fdb61e1d96da0cd32545817b925ba88831c1
      8dfaa5ec
    • J
      Use constants from math package instead of literals. · 7b35e0f0
      Julius Volz 提交于
      Change-Id: I55427ba32c2cbb32ee42ec1e3153160965ab8b3c
      7b35e0f0
    • J
      Check that chunk buffer length fits in 16 bit. · fd01d075
      Julius Volz 提交于
      Change-Id: Id086a54aa8a1990c1979e747c1c02e53bed6d447
      fd01d075
    • B
      Fix precision loss. · d742edfe
      Bjoern Rabenstein 提交于
      Large delta values often imply a difference between a large base value
      and the large delta value, potentially resulting in small numbers with
      a huge precision error. Since large delta values need 8 bytes anyway,
      we are not even saving memory.
      
      As a solution, always save the absoluto value rather than a delta once
      8 bytes would be needed for the delta. Timestamps are then saved as 8
      byte integers, while values are always saved as float64 in that case.
      
      Change-Id: I01100d600515e16df58ce508b50982ffd762cc49
      d742edfe
    • B
      Index-persistence switched from gob to a hand-coded solution. · ecdf5ab1
      Bjoern Rabenstein 提交于
      Change-Id: Ib4ec42535bd08df16d34d4774bb638e35c5a1841
      ecdf5ab1
    • J
      Initial experimental snapshot of next-gen storage. · e7ed39c9
      Julius Volz 提交于
      Change-Id: Ifb8709960dbedd1d9f5efd88cdd359ee9fa9d26d
      e7ed39c9