mirror of
https://github.com/prometheus/prometheus
synced 2025-01-30 03:33:32 +00:00
parent
425f591fc9
commit
17f15d024a
@ -500,7 +500,7 @@ func (sl *scrapeLoop) append(samples model.Samples) (int, error) {
|
||||
var wrappedBufApp storage.SampleAppender
|
||||
wrappedBufApp, countingApp = sl.wrapAppender(bufApp)
|
||||
for _, s := range samples {
|
||||
// Ignore errors as bufferedAppender always succeds.
|
||||
// Ignore errors as bufferedAppender always succeeds.
|
||||
wrappedBufApp.Append(s)
|
||||
}
|
||||
samples = bufApp.buffer
|
||||
|
@ -143,7 +143,7 @@ func TestQueryRange(t *testing.T) {
|
||||
},
|
||||
},
|
||||
remote: []model.Matrix{
|
||||
model.Matrix{
|
||||
{
|
||||
&model.SampleStream{
|
||||
Metric: model.Metric{
|
||||
model.MetricNameLabel: "testmetric",
|
||||
@ -164,7 +164,7 @@ func TestQueryRange(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
model.Matrix{
|
||||
{
|
||||
&model.SampleStream{
|
||||
Metric: model.Metric{
|
||||
model.MetricNameLabel: "testmetric",
|
||||
@ -231,7 +231,7 @@ func TestQueryRange(t *testing.T) {
|
||||
},
|
||||
},
|
||||
remote: []model.Matrix{
|
||||
model.Matrix{
|
||||
{
|
||||
&model.SampleStream{
|
||||
Metric: model.Metric{
|
||||
model.MetricNameLabel: "testmetric",
|
||||
@ -252,7 +252,7 @@ func TestQueryRange(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
model.Matrix{
|
||||
{
|
||||
&model.SampleStream{
|
||||
Metric: model.Metric{
|
||||
model.MetricNameLabel: "testmetric",
|
||||
@ -323,7 +323,7 @@ func TestQueryRange(t *testing.T) {
|
||||
{
|
||||
name: "no local data",
|
||||
remote: []model.Matrix{
|
||||
model.Matrix{
|
||||
{
|
||||
&model.SampleStream{
|
||||
Metric: model.Metric{
|
||||
model.MetricNameLabel: "testmetric",
|
||||
@ -345,7 +345,7 @@ func TestQueryRange(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
model.Matrix{
|
||||
{
|
||||
&model.SampleStream{
|
||||
Metric: model.Metric{
|
||||
model.MetricNameLabel: "testmetric",
|
||||
@ -507,7 +507,7 @@ func TestQueryRange(t *testing.T) {
|
||||
},
|
||||
},
|
||||
remote: []model.Matrix{
|
||||
model.Matrix{
|
||||
{
|
||||
&model.SampleStream{
|
||||
Metric: model.Metric{
|
||||
model.MetricNameLabel: "testmetric",
|
||||
|
@ -1209,7 +1209,7 @@ func (s *MemorySeriesStorage) maybeEvict() {
|
||||
// to 1 to signal that we want to evict chunk but have no evictable chunks
|
||||
// available.
|
||||
//
|
||||
// - Otherwise, calulate the number of chunks to evict and return it:
|
||||
// - Otherwise, calculate the number of chunks to evict and return it:
|
||||
//
|
||||
// MAX( h(nextGC), h(current) ) - h(target)
|
||||
// n(toEvict) = MIN( n(evictable), ---------------------------------------- )
|
||||
|
@ -453,7 +453,7 @@ func TestEndpoints(t *testing.T) {
|
||||
endpoint: api.targets,
|
||||
response: &TargetDiscovery{
|
||||
ActiveTargets: []*Target{
|
||||
&Target{
|
||||
{
|
||||
DiscoveredLabels: model.LabelSet{},
|
||||
Labels: model.LabelSet{},
|
||||
ScrapeURL: "http://example.com:8080/metrics",
|
||||
@ -465,7 +465,7 @@ func TestEndpoints(t *testing.T) {
|
||||
endpoint: api.alertmanagers,
|
||||
response: &AlertmanagerDiscovery{
|
||||
ActiveAlertmanagers: []*AlertmanagerTarget{
|
||||
&AlertmanagerTarget{
|
||||
{
|
||||
URL: "http://alertmanager.example.com:8080/api/v1/alerts",
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user