Skip to content

Commit

Permalink
cleanup: fix some typos in code comment (#1444)
Browse files Browse the repository at this point in the history
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
  • Loading branch information
Guangming Wang authored and bwplotka committed Aug 21, 2019
1 parent 889f977 commit c35d47b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/compact/downsample/downsample.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,15 @@ func targetChunkCount(mint, maxt, inRes, outRes int64, count int) (x int) {
return x
}

// aggregator collects commulative stats for a stream of values.
// aggregator collects cumulative stats for a stream of values.
type aggregator struct {
total int // total samples processed
count int // samples in current window
sum float64 // value sum of current window
min float64 // min of current window
max float64 // max of current window
counter float64 // total counter state since beginning
resets int // number of counter resests since beginning
resets int // number of counter resets since beginning
last float64 // last added value
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/promclient/promclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ func PromqlQueryInstant(ctx context.Context, logger log.Logger, base *url.URL, q
func convertScalarJSONToVector(scalarJSONResult json.RawMessage) (model.Vector, error) {
var (
// Do not specify exact length of the expected slice since JSON unmarshaling
// would make the leght fit the size and we won't be able to check the length afterwards.
// would make the length fit the size and we won't be able to check the length afterwards.
resultPointSlice []json.RawMessage
resultTime model.Time
resultValue model.SampleValue
Expand Down
2 changes: 1 addition & 1 deletion pkg/shipper/shipper.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ func hardlinkBlock(src, dst string) error {
return nil
}

// Meta defines the fomart thanos.shipper.json file that the shipper places in the data directory.
// Meta defines the format thanos.shipper.json file that the shipper places in the data directory.
type Meta struct {
Version int `json:"version"`
Uploaded []ulid.ULID `json:"uploaded"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/ui/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func ruleTmplFuncs(queryURL string) template.FuncMap {
if minutes != 0 {
return fmt.Sprintf("%s%dm %ds", sign, minutes, seconds)
}
// For seconds, we display 4 significant digts.
// For seconds, we display 4 significant digits.
return fmt.Sprintf("%s%.4gs", sign, v)
}
prefix := ""
Expand Down

0 comments on commit c35d47b

Please sign in to comment.