Fix spelling mistakes (#4888)

This commit is contained in:
Trevor Pounds 2018-10-19 14:12:01 -04:00 committed by Daniel Nelson
parent 1ec12ba6ad
commit 17360f079c
9 changed files with 13 additions and 13 deletions

View File

@ -291,7 +291,7 @@ func TestBasicStatsWithOnlySum(t *testing.T) {
} }
// Verify that sum doesn't suffer from floating point errors. Early // Verify that sum doesn't suffer from floating point errors. Early
// implementations of sum were calulated from mean and count, which // implementations of sum were calculated from mean and count, which
// e.g. summed "1, 1, 5, 1" as "7.999999..." instead of 8. // e.g. summed "1, 1, 5, 1" as "7.999999..." instead of 8.
func TestBasicStatsWithOnlySumFloatingPointErrata(t *testing.T) { func TestBasicStatsWithOnlySumFloatingPointErrata(t *testing.T) {
@ -509,7 +509,7 @@ func TestBasicStatsWithUnknownStat(t *testing.T) {
} }
// Test that if Stats isn't supplied, then we only do count, min, max, mean, // Test that if Stats isn't supplied, then we only do count, min, max, mean,
// stdev, and s2. We purposely exclude sum for backwards compatability, // stdev, and s2. We purposely exclude sum for backwards compatibility,
// otherwise user's working systems will suddenly (and surprisingly) start // otherwise user's working systems will suddenly (and surprisingly) start
// capturing sum without their input. // capturing sum without their input.
func TestBasicStatsWithDefaultStats(t *testing.T) { func TestBasicStatsWithDefaultStats(t *testing.T) {

View File

@ -20,7 +20,7 @@ type ValueCounter struct {
Fields []string Fields []string
} }
// NewValueCounter create a new aggregation plugin which counts the occurances // NewValueCounter create a new aggregation plugin which counts the occurrences
// of fields and emits the count. // of fields and emits the count.
func NewValueCounter() telegraf.Aggregator { func NewValueCounter() telegraf.Aggregator {
vc := &ValueCounter{} vc := &ValueCounter{}
@ -46,7 +46,7 @@ func (vc *ValueCounter) SampleConfig() string {
// Description returns the description of the ValueCounter plugin // Description returns the description of the ValueCounter plugin
func (vc *ValueCounter) Description() string { func (vc *ValueCounter) Description() string {
return "Count the occurance of values in fields." return "Count the occurrence of values in fields."
} }
// Add is run on every metric which passes the plugin // Add is run on every metric which passes the plugin

View File

@ -33,7 +33,7 @@ func (pg *NativeFinder) Pattern(pattern string) ([]PID, error) {
return pids, err return pids, err
} }
//FullPattern matches on the command line when the proccess was executed //FullPattern matches on the command line when the process was executed
func (pg *NativeFinder) FullPattern(pattern string) ([]PID, error) { func (pg *NativeFinder) FullPattern(pattern string) ([]PID, error) {
var pids []PID var pids []PID
regxPattern, err := regexp.Compile(pattern) regxPattern, err := regexp.Compile(pattern)

View File

@ -183,7 +183,7 @@ func escapeObject(m map[string]interface{}) (string, error) {
return `{` + strings.Join(pairs, ", ") + `}`, nil return `{` + strings.Join(pairs, ", ") + `}`, nil
} }
// escapeString wraps s in the given quote string and replaces all occurences // escapeString wraps s in the given quote string and replaces all occurrences
// of it inside of s with a double quote. // of it inside of s with a double quote.
func escapeString(s string, quote string) string { func escapeString(s string, quote string) string {
return quote + strings.Replace(s, quote, quote+quote, -1) + quote return quote + strings.Replace(s, quote, quote+quote, -1) + quote
@ -191,7 +191,7 @@ func escapeString(s string, quote string) string {
// hashID returns a cryptographic hash int64 hash that includes the metric name // hashID returns a cryptographic hash int64 hash that includes the metric name
// and tags. It's used instead of m.HashID() because it's not considered stable // and tags. It's used instead of m.HashID() because it's not considered stable
// and because a cryptogtaphic hash makes more sense for the use case of // and because a cryptographic hash makes more sense for the use case of
// deduplication. // deduplication.
// [1] https://github.com/influxdata/telegraf/pull/3210#discussion_r148411201 // [1] https://github.com/influxdata/telegraf/pull/3210#discussion_r148411201
func hashID(m telegraf.Metric) int64 { func hashID(m telegraf.Metric) int64 {

View File

@ -173,7 +173,7 @@ func (g *Graphite) send(batch []byte) error {
if _, e := g.conns[n].Write(batch); e != nil { if _, e := g.conns[n].Write(batch); e != nil {
// Error // Error
log.Println("E! Graphite Error: " + e.Error()) log.Println("E! Graphite Error: " + e.Error())
// Close explicitely // Close explicitly
g.conns[n].Close() g.conns[n].Close()
// Let's try the next one // Let's try the next one
} else { } else {

View File

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

View File

@ -957,7 +957,7 @@ func TestReplaceTimestampComma(t *testing.T) {
require.Equal(t, 2018, m.Time().Year()) require.Equal(t, 2018, m.Time().Year())
require.Equal(t, 13, m.Time().Hour()) require.Equal(t, 13, m.Time().Hour())
require.Equal(t, 34, m.Time().Second()) require.Equal(t, 34, m.Time().Second())
//Convert Nanosecond to milisecond for compare // Convert nanosecond to millisecond for compare
require.Equal(t, 555, m.Time().Nanosecond()/1000000) require.Equal(t, 555, m.Time().Nanosecond()/1000000)
} }

View File

@ -209,7 +209,7 @@ func (t *TopK) Apply(in ...telegraf.Metric) []telegraf.Metric {
// Add the metrics received to our internal cache // Add the metrics received to our internal cache
for _, m := range in { for _, m := range in {
// Check if the metric has any of the fields over wich we are aggregating // Check if the metric has any of the fields over which we are aggregating
hasField := false hasField := false
for _, f := range t.Fields { for _, f := range t.Fields {
if m.HasField(f) { if m.HasField(f) {
@ -279,7 +279,7 @@ func (t *TopK) push() []telegraf.Metric {
// Sort the aggregations // Sort the aggregations
sortMetrics(aggregations, field, t.Bottomk) sortMetrics(aggregations, field, t.Bottomk)
// Create a one dimentional list with the top K metrics of each key // Create a one dimensional list with the top K metrics of each key
for i, ag := range aggregations[0:min(t.K, len(aggregations))] { for i, ag := range aggregations[0:min(t.K, len(aggregations))] {
// Check whether of not we need to add fields of tags to the selected metrics // Check whether of not we need to add fields of tags to the selected metrics

View File

@ -52,7 +52,7 @@ func (s *serializer) createObject(metric telegraf.Metric) (metricGroup []byte, e
** metric_name: The name of the metric ** metric_name: The name of the metric
** _value: The value for the metric ** _value: The value for the metric
** time: The timestamp for the metric ** time: The timestamp for the metric
** All other index fields become deminsions. ** All other index fields become dimensions.
*/ */
type HECTimeSeries struct { type HECTimeSeries struct {
Time float64 `json:"time"` Time float64 `json:"time"`