mirror of
https://github.com/prometheus/prometheus.git
synced 2025-07-03 02:53:24 +00:00
Initial experimental snapshot of next-gen storage.
Change-Id: Ifb8709960dbedd1d9f5efd88cdd359ee9fa9d26d
This commit is contained in:
parent
134bd8fe34
commit
e7ed39c9a6
81 changed files with 2829 additions and 13909 deletions
|
@ -19,6 +19,7 @@ import (
|
|||
clientmodel "github.com/prometheus/client_golang/model"
|
||||
|
||||
"github.com/prometheus/prometheus/rules/ast"
|
||||
"github.com/prometheus/prometheus/storage/local"
|
||||
"github.com/prometheus/prometheus/storage/metric"
|
||||
)
|
||||
|
||||
|
@ -51,7 +52,7 @@ func getTestVectorFromTestMatrix(matrix ast.Matrix) ast.Vector {
|
|||
return vector
|
||||
}
|
||||
|
||||
func storeMatrix(storage metric.Persistence, matrix ast.Matrix) (err error) {
|
||||
func storeMatrix(storage storage_ng.Storage, matrix ast.Matrix) {
|
||||
pendingSamples := clientmodel.Samples{}
|
||||
for _, sampleSet := range matrix {
|
||||
for _, sample := range sampleSet.Values {
|
||||
|
@ -62,8 +63,7 @@ func storeMatrix(storage metric.Persistence, matrix ast.Matrix) (err error) {
|
|||
})
|
||||
}
|
||||
}
|
||||
err = storage.AppendSamples(pendingSamples)
|
||||
return
|
||||
storage.AppendSamples(pendingSamples)
|
||||
}
|
||||
|
||||
var testMatrix = ast.Matrix{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue