Simplify code, fix typos. (#2719)

This commit is contained in:
Alexey Palazhchenko 2017-05-15 11:56:09 +03:00 committed by Brian Brazil
parent 61235fd851
commit b0e1ea7c6c
2 changed files with 3 additions and 3 deletions

View File

@ -41,7 +41,7 @@ func TestAlertingRuleHTMLSnippet(t *testing.T) {
func TestCurrentAlertsClonesLabelsAndAnnotations(t *testing.T) {
r := AlertingRule{
active: map[model.Fingerprint]*Alert{
0: &Alert{
0: {
Labels: model.LabelSet{"test_label": "test_label_value"},
Annotations: model.LabelSet{"test_annotation": "test_annotation_value"},
},

View File

@ -323,7 +323,7 @@ func (t *QueueManager) calculateDesiredShards() {
timePerSample = samplesOutDuration / samplesOut
desiredShards = (timePerSample * (samplesIn + samplesPending + t.integralAccumulator)) / float64(time.Second)
)
log.Debugf("QueueManager.caclulateDesiredShards samplesIn=%f, samplesOut=%f, samplesPending=%f, desiredShards=%f",
log.Debugf("QueueManager.calculateDesiredShards samplesIn=%f, samplesOut=%f, samplesPending=%f, desiredShards=%f",
samplesIn, samplesOut, samplesPending, desiredShards)
// Changes in the number of shards must be greater than shardToleranceFraction.
@ -478,7 +478,7 @@ func (s *shards) sendSamples(samples model.Samples) {
begin := time.Now()
s.sendSamplesWithBackoff(samples)
// These counters are used to caclulate the dynamic sharding, and as such
// These counters are used to calculate the dynamic sharding, and as such
// should be maintained irrespective of success or failure.
s.qm.samplesOut.incr(int64(len(samples)))
s.qm.samplesOutDuration.incr(int64(time.Since(begin)))