Skip to content

Commit

Permalink
Small fixes. (prometheus#2578)
Browse files Browse the repository at this point in the history
Fix typos. Simplify with gofmt -s
  • Loading branch information
AlekSi authored and brian-brazil committed Apr 5, 2017
1 parent 425f591 commit 17f15d0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion retrieval/scrape.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions storage/fanin/fanin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func TestQueryRange(t *testing.T) {
},
},
remote: []model.Matrix{
model.Matrix{
{
&model.SampleStream{
Metric: model.Metric{
model.MetricNameLabel: "testmetric",
Expand All @@ -164,7 +164,7 @@ func TestQueryRange(t *testing.T) {
},
},
},
model.Matrix{
{
&model.SampleStream{
Metric: model.Metric{
model.MetricNameLabel: "testmetric",
Expand Down Expand Up @@ -231,7 +231,7 @@ func TestQueryRange(t *testing.T) {
},
},
remote: []model.Matrix{
model.Matrix{
{
&model.SampleStream{
Metric: model.Metric{
model.MetricNameLabel: "testmetric",
Expand All @@ -252,7 +252,7 @@ func TestQueryRange(t *testing.T) {
},
},
},
model.Matrix{
{
&model.SampleStream{
Metric: model.Metric{
model.MetricNameLabel: "testmetric",
Expand Down Expand Up @@ -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",
Expand All @@ -345,7 +345,7 @@ func TestQueryRange(t *testing.T) {
},
},
},
model.Matrix{
{
&model.SampleStream{
Metric: model.Metric{
model.MetricNameLabel: "testmetric",
Expand Down Expand Up @@ -507,7 +507,7 @@ func TestQueryRange(t *testing.T) {
},
},
remote: []model.Matrix{
model.Matrix{
{
&model.SampleStream{
Metric: model.Metric{
model.MetricNameLabel: "testmetric",
Expand Down
2 changes: 1 addition & 1 deletion storage/local/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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), ---------------------------------------- )
Expand Down
4 changes: 2 additions & 2 deletions web/api/v1/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
},
},
Expand Down

0 comments on commit 17f15d0

Please sign in to comment.