Skip to content

Commit 17360f0

Browse files
tpoundsdanielnelson
authored andcommitted
Fix spelling mistakes (influxdata#4888)
1 parent 1ec12ba commit 17360f0

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

plugins/aggregators/basicstats/basicstats_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ func TestBasicStatsWithOnlySum(t *testing.T) {
291291
}
292292

293293
// Verify that sum doesn't suffer from floating point errors. Early
294-
// implementations of sum were calulated from mean and count, which
294+
// implementations of sum were calculated from mean and count, which
295295
// e.g. summed "1, 1, 5, 1" as "7.999999..." instead of 8.
296296
func TestBasicStatsWithOnlySumFloatingPointErrata(t *testing.T) {
297297

@@ -509,7 +509,7 @@ func TestBasicStatsWithUnknownStat(t *testing.T) {
509509
}
510510

511511
// Test that if Stats isn't supplied, then we only do count, min, max, mean,
512-
// stdev, and s2. We purposely exclude sum for backwards compatability,
512+
// stdev, and s2. We purposely exclude sum for backwards compatibility,
513513
// otherwise user's working systems will suddenly (and surprisingly) start
514514
// capturing sum without their input.
515515
func TestBasicStatsWithDefaultStats(t *testing.T) {

plugins/aggregators/valuecounter/valuecounter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type ValueCounter struct {
2020
Fields []string
2121
}
2222

23-
// NewValueCounter create a new aggregation plugin which counts the occurances
23+
// NewValueCounter create a new aggregation plugin which counts the occurrences
2424
// of fields and emits the count.
2525
func NewValueCounter() telegraf.Aggregator {
2626
vc := &ValueCounter{}
@@ -46,7 +46,7 @@ func (vc *ValueCounter) SampleConfig() string {
4646

4747
// Description returns the description of the ValueCounter plugin
4848
func (vc *ValueCounter) Description() string {
49-
return "Count the occurance of values in fields."
49+
return "Count the occurrence of values in fields."
5050
}
5151

5252
// Add is run on every metric which passes the plugin

plugins/inputs/procstat/native_finder_notwindows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (pg *NativeFinder) Pattern(pattern string) ([]PID, error) {
3333
return pids, err
3434
}
3535

36-
//FullPattern matches on the command line when the proccess was executed
36+
//FullPattern matches on the command line when the process was executed
3737
func (pg *NativeFinder) FullPattern(pattern string) ([]PID, error) {
3838
var pids []PID
3939
regxPattern, err := regexp.Compile(pattern)

plugins/outputs/cratedb/cratedb.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,15 @@ func escapeObject(m map[string]interface{}) (string, error) {
183183
return `{` + strings.Join(pairs, ", ") + `}`, nil
184184
}
185185

186-
// escapeString wraps s in the given quote string and replaces all occurences
186+
// escapeString wraps s in the given quote string and replaces all occurrences
187187
// of it inside of s with a double quote.
188188
func escapeString(s string, quote string) string {
189189
return quote + strings.Replace(s, quote, quote+quote, -1) + quote
190190
}
191191

192192
// hashID returns a cryptographic hash int64 hash that includes the metric name
193193
// and tags. It's used instead of m.HashID() because it's not considered stable
194-
// and because a cryptogtaphic hash makes more sense for the use case of
194+
// and because a cryptographic hash makes more sense for the use case of
195195
// deduplication.
196196
// [1] https://github.com/influxdata/telegraf/pull/3210#discussion_r148411201
197197
func hashID(m telegraf.Metric) int64 {

plugins/outputs/graphite/graphite.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ func (g *Graphite) send(batch []byte) error {
173173
if _, e := g.conns[n].Write(batch); e != nil {
174174
// Error
175175
log.Println("E! Graphite Error: " + e.Error())
176-
// Close explicitely
176+
// Close explicitly
177177
g.conns[n].Close()
178178
// Let's try the next one
179179
} else {

plugins/outputs/influxdb/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func (c *httpClient) Database() string {
220220
return c.database
221221
}
222222

223-
// CreateDatabase attemps to create a new database in the InfluxDB server.
223+
// CreateDatabase attempts to create a new database in the InfluxDB server.
224224
// Note that some names are not allowed by the server, notably those with
225225
// non-printable characters or slashes.
226226
func (c *httpClient) CreateDatabase(ctx context.Context) error {

plugins/parsers/grok/parser_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ func TestReplaceTimestampComma(t *testing.T) {
957957
require.Equal(t, 2018, m.Time().Year())
958958
require.Equal(t, 13, m.Time().Hour())
959959
require.Equal(t, 34, m.Time().Second())
960-
//Convert Nanosecond to milisecond for compare
960+
// Convert nanosecond to millisecond for compare
961961
require.Equal(t, 555, m.Time().Nanosecond()/1000000)
962962
}
963963

plugins/processors/topk/topk.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func (t *TopK) Apply(in ...telegraf.Metric) []telegraf.Metric {
209209
// Add the metrics received to our internal cache
210210
for _, m := range in {
211211

212-
// Check if the metric has any of the fields over wich we are aggregating
212+
// Check if the metric has any of the fields over which we are aggregating
213213
hasField := false
214214
for _, f := range t.Fields {
215215
if m.HasField(f) {
@@ -279,7 +279,7 @@ func (t *TopK) push() []telegraf.Metric {
279279
// Sort the aggregations
280280
sortMetrics(aggregations, field, t.Bottomk)
281281

282-
// Create a one dimentional list with the top K metrics of each key
282+
// Create a one dimensional list with the top K metrics of each key
283283
for i, ag := range aggregations[0:min(t.K, len(aggregations))] {
284284

285285
// Check whether of not we need to add fields of tags to the selected metrics

plugins/serializers/splunkmetric/splunkmetric.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (s *serializer) createObject(metric telegraf.Metric) (metricGroup []byte, e
5252
** metric_name: The name of the metric
5353
** _value: The value for the metric
5454
** time: The timestamp for the metric
55-
** All other index fields become deminsions.
55+
** All other index fields become dimensions.
5656
*/
5757
type HECTimeSeries struct {
5858
Time float64 `json:"time"`

0 commit comments

Comments
 (0)