Simplify code, fix typos. (#2719)
This commit is contained in:
parent
61235fd851
commit
b0e1ea7c6c
|
@ -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"},
|
||||
},
|
||||
|
|
|
@ -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)))
|
||||
|
|
Loading…
Reference in New Issue