Skip to content

Commit

Permalink
Migrate internal stats to consistent names
Browse files Browse the repository at this point in the history
Go style -- and existing runtime stats -- do not use underscores, but
instead use camel case. This change makes the internal stats adhere to
that convention.
  • Loading branch information
otoolep committed Oct 29, 2015
1 parent 4e2a16c commit de79192
Show file tree
Hide file tree
Showing 14 changed files with 101 additions and 97 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## v0.9.5 [unreleased]

### Release Notes
- Field names for the internal stats have been changed to be more inline with Go style.

### Features
- [#4098](https://github.com/influxdb/influxdb/issues/4098): Enable `golint` on the code base - uuid subpackage
- [#4141](https://github.com/influxdb/influxdb/pull/4141): Control whether each query should be logged
Expand Down Expand Up @@ -86,6 +89,7 @@
- [#4521](https://github.com/influxdb/influxdb/issues/4521): TSM1: panic: decode of short block: got 1, exp 9
- [#4587](https://github.com/influxdb/influxdb/pull/4587): Prevent NaN float values from being stored
- [#4596](https://github.com/influxdb/influxdb/pull/4596): Skip empty string for start position when parsing line protocol @Thanks @ch33hau
- [#4610](https://github.com/influxdb/influxdb/pull/4610): Make internal stats names consistent with Go style.

## v0.9.4 [2015-09-14]

Expand Down
20 changes: 10 additions & 10 deletions cluster/points_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ type ConsistencyLevel int
// The statistics generated by the "write" mdoule
const (
statWriteReq = "req"
statPointWriteReq = "point_req"
statPointWriteReqLocal = "point_req_local"
statPointWriteReqRemote = "point_req_remote"
statWriteOK = "write_ok"
statWritePartial = "write_partial"
statWriteTimeout = "write_timeout"
statWriteErr = "write_error"
statWritePointReqHH = "point_req_hh"
statSubWriteOK = "sub_write_ok"
statSubWriteDrop = "sub_write_drop"
statPointWriteReq = "pointReq"
statPointWriteReqLocal = "pointReqLocal"
statPointWriteReqRemote = "pointReqRemote"
statWriteOK = "writeOk"
statWritePartial = "writePartial"
statWriteTimeout = "writeTimeout"
statWriteErr = "writeError"
statWritePointReqHH = "pointReqHH"
statSubWriteOK = "subWriteOk"
statSubWriteDrop = "subWriteDrop"
)

const (
Expand Down
10 changes: 5 additions & 5 deletions cluster/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ const MuxHeader = 2

// Statistics maintained by the cluster package
const (
writeShardReq = "write_shard_req"
writeShardPointsReq = "write_shard_points_req"
writeShardFail = "write_shard_fail"
mapShardReq = "map_shard_req"
mapShardResp = "map_shard_resp"
writeShardReq = "writeShardReq"
writeShardPointsReq = "writeShardPointsReq"
writeShardFail = "writeShardFail"
mapShardReq = "mapShardReq"
mapShardResp = "mapShardResp"
)

// Service processes data received over raw TCP connections.
Expand Down
14 changes: 7 additions & 7 deletions services/collectd/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ const leaderWaitTimeout = 30 * time.Second

// statistics gathered by the collectd service.
const (
statPointsReceived = "points_rx"
statBytesReceived = "bytes_rx"
statPointsParseFail = "points_parse_fail"
statReadFail = "read_fail"
statBatchesTrasmitted = "batches_tx"
statPointsTransmitted = "points_tx"
statBatchesTransmitFail = "batches_tx_fail"
statPointsReceived = "pointsRx"
statBytesReceived = "bytesRx"
statPointsParseFail = "pointsParseFail"
statReadFail = "readFail"
statBatchesTrasmitted = "batchesTx"
statPointsTransmitted = "pointsTx"
statBatchesTransmitFail = "batchesTxFail"
)

// pointsWriter is an internal interface to make testing easier.
Expand Down
6 changes: 3 additions & 3 deletions services/continuous_querier/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ const (

// Statistics for the CQ service.
const (
statQueryOK = "query_ok"
statQueryFail = "query_fail"
statPointsWritten = "points_written"
statQueryOK = "queryOk"
statQueryFail = "queryFail"
statPointsWritten = "pointsWritten"
)

// ContinuousQuerier represents a service that executes continuous queries.
Expand Down
18 changes: 9 additions & 9 deletions services/graphite/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ const (

// statistics gathered by the graphite package.
const (
statPointsReceived = "points_rx"
statBytesReceived = "bytes_rx"
statPointsParseFail = "points_parse_fail"
statPointsUnsupported = "points_unsupported_fail"
statBatchesTrasmitted = "batches_tx"
statPointsTransmitted = "points_tx"
statBatchesTransmitFail = "batches_tx_fail"
statConnectionsActive = "connections_active"
statConnectionsHandled = "connections_handled"
statPointsReceived = "pointsRx"
statBytesReceived = "bytesRx"
statPointsParseFail = "pointsParseFail"
statPointsUnsupported = "pointsUnsupportedFail"
statBatchesTrasmitted = "batchesTx"
statPointsTransmitted = "pointsTx"
statBatchesTransmitFail = "batchesTxFail"
statConnectionsActive = "connsActive"
statConnectionsHandled = "connsHandled"
)

type tcpConnection struct {
Expand Down
10 changes: 5 additions & 5 deletions services/hh/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
var ErrHintedHandoffDisabled = fmt.Errorf("hinted handoff disabled")

const (
writeShardReq = "wr_shard_req"
writeShardReqPoints = "wr_shard_req_points"
writeNodeReq = "wr_node_req"
writeNodeReqFail = "wr_node_req_fail"
writeNodeReqPoints = "wr_node_req_points"
writeShardReq = "writeShardReq"
writeShardReqPoints = "writeShardReqPoints"
writeNodeReq = "writeNodeReq"
writeNodeReqFail = "writeNodeReqFail"
writeNodeReqPoints = "writeNodeReqPoints"
)

type Service struct {
Expand Down
20 changes: 10 additions & 10 deletions services/httpd/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ import (

// statistics gathered by the httpd package.
const (
statRequest = "req" // Number of HTTP requests served
statCQRequest = "cq_req" // Number of CQ-execute requests served
statQueryRequest = "query_req" // Number of query requests served
statWriteRequest = "write_req" // Number of write requests serverd
statPingRequest = "ping_req" // Number of ping requests served
statWriteRequestBytesReceived = "write_req_bytes" // Sum of all bytes in write requests
statQueryRequestBytesTransmitted = "query_resp_bytes" // Sum of all bytes returned in query reponses
statPointsWrittenOK = "points_written_ok" // Number of points written OK
statPointsWrittenFail = "points_written_fail" // Number of points that failed to be written
statAuthFail = "auth_fail" // Number of authentication failures
statRequest = "req" // Number of HTTP requests served
statCQRequest = "cqReq" // Number of CQ-execute requests served
statQueryRequest = "queryReq" // Number of query requests served
statWriteRequest = "writeReq" // Number of write requests serverd
statPingRequest = "pingReq" // Number of ping requests served
statWriteRequestBytesReceived = "writeReqBytes" // Sum of all bytes in write requests
statQueryRequestBytesTransmitted = "queryRespBytes" // Sum of all bytes returned in query reponses
statPointsWrittenOK = "pointsWritteOk" // Number of points written OK
statPointsWrittenFail = "pointsWrittenFail" // Number of points that failed to be written
statAuthFail = "authFail" // Number of authentication failures
)

// Service manages the listener and handler for an HTTP endpoint.
Expand Down
30 changes: 15 additions & 15 deletions services/opentsdb/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ const leaderWaitTimeout = 30 * time.Second

// statistics gathered by the openTSDB package.
const (
statHTTPConnectionsHandled = "http_connections_handled"
statTelnetConnectionsActive = "tl_connections_active"
statTelnetConnectionsHandled = "tl_connections_handled"
statTelnetPointsReceived = "tl_points_rx"
statTelnetBytesReceived = "tl_bytes_rx"
statTelnetReadError = "tl_read_err"
statTelnetBadLine = "tl_bad_line"
statTelnetBadTime = "tl_bad_time"
statTelnetBadTag = "tl_bad_tag"
statTelnetBadFloat = "tl_bad_float"
statBatchesTrasmitted = "batches_tx"
statPointsTransmitted = "points_tx"
statBatchesTransmitFail = "batches_tx_fail"
statConnectionsActive = "connections_active"
statConnectionsHandled = "connections_handled"
statHTTPConnectionsHandled = "httpConnsHandled"
statTelnetConnectionsActive = "tlConnsActive"
statTelnetConnectionsHandled = "tlConnsHandled"
statTelnetPointsReceived = "tlPointsRx"
statTelnetBytesReceived = "tlBytesRx"
statTelnetReadError = "tlReadErr"
statTelnetBadLine = "tlBadLine"
statTelnetBadTime = "tlBadTime"
statTelnetBadTag = "tlBadTag"
statTelnetBadFloat = "tlBadFloat"
statBatchesTrasmitted = "batchesTx"
statPointsTransmitted = "pointsTx"
statBatchesTransmitFail = "batchesTxFail"
statConnectionsActive = "connsActive"
statConnectionsHandled = "connsHandled"
)

// Service manages the listener and handler for an HTTP endpoint.
Expand Down
4 changes: 2 additions & 2 deletions services/subscriber/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (

// Statistics for the Subscriber service.
const (
statPointsWritten = "points_written"
statWriteFailures = "write_failures"
statPointsWritten = "pointsWritten"
statWriteFailures = "writeFailures"
)

type PointsWriter interface {
Expand Down
14 changes: 7 additions & 7 deletions services/udp/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ const (

// statistics gathered by the UDP package.
const (
statPointsReceived = "points_rx"
statBytesReceived = "bytes_rx"
statPointsParseFail = "points_parse_fail"
statReadFail = "read_fail"
statBatchesTrasmitted = "batches_tx"
statPointsTransmitted = "points_tx"
statBatchesTransmitFail = "batches_tx_fail"
statPointsReceived = "pointsRx"
statBytesReceived = "bytesRx"
statPointsParseFail = "pointsParseFail"
statReadFail = "readFail"
statBatchesTrasmitted = "batchesTx"
statPointsTransmitted = "pointsTx"
statBatchesTransmitFail = "batchesTxFail"
)

//
Expand Down
12 changes: 6 additions & 6 deletions tsdb/engine/bz1/bz1.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ const (
)

const (
statSlowInsert = "slow_insert"
statPointsWrite = "points_write"
statPointsWriteDedupe = "points_write_dedupe"
statBlocksWrite = "blks_write"
statBlocksWriteBytes = "blks_write_bytes"
statBlocksWriteBytesCompress = "blks_write_bytes_c"
statSlowInsert = "slowInsert"
statPointsWrite = "pointsWrite"
statPointsWriteDedupe = "pointsWriteDedupe"
statBlocksWrite = "blksWrite"
statBlocksWriteBytes = "blksWriteBytes"
statBlocksWriteBytesCompress = "blksWriteBytesC"
)

func init() {
Expand Down
24 changes: 12 additions & 12 deletions tsdb/engine/wal/wal.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,19 @@ const (

// Statistics maintained by the WAL
const (
statPointsWriteReq = "points_write_req"
statPointsWrite = "points_write"
statPointsWriteReq = "pointsWriteReq"
statPointsWrite = "pointsWrite"
statFlush = "flush"
statAutoFlush = "auto_flush"
statIdleFlush = "idle_flush"
statMetadataFlush = "meta_flush"
statThresholdFlush = "threshold_flush"
statMemoryFlush = "mem_flush"
statSeriesFlushed = "series_flush"
statPointsFlushed = "points_flush"
statFlushDuration = "flush_duration"
statWriteFail = "write_fail"
statMemorySize = "mem_size"
statAutoFlush = "autoFlush"
statIdleFlush = "idleFlush"
statMetadataFlush = "metaFlush"
statThresholdFlush = "thresholdFlush"
statMemoryFlush = "memFlush"
statSeriesFlushed = "seriesFlush"
statPointsFlushed = "pointsFlush"
statFlushDuration = "flushDuration"
statWriteFail = "writeFail"
statMemorySize = "memSize"
)

// flushType indiciates why a flush and compaction are being run so the partition can
Expand Down
12 changes: 6 additions & 6 deletions tsdb/shard.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import (
)

const (
statWriteReq = "write_req"
statSeriesCreate = "series_create"
statFieldsCreate = "fields_create"
statWritePointsFail = "write_points_fail"
statWritePointsOK = "write_points_ok"
statWriteBytes = "write_bytes"
statWriteReq = "writeReq"
statSeriesCreate = "seriesCreate"
statFieldsCreate = "fieldsCreate"
statWritePointsFail = "writePointsFail"
statWritePointsOK = "writePointsOk"
statWriteBytes = "writeBytes"
)

var (
Expand Down

0 comments on commit de79192

Please sign in to comment.