Skip to content

Commit

Permalink
forgot gofmt -w
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Brancatelli authored and gesellix committed Oct 6, 2020
1 parent f92c968 commit c28b046
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
3 changes: 1 addition & 2 deletions lib/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func (e *Exporter) Describe(ch chan<- *prometheus.Desc) {
e.mangoQuorumDocsExamined.Describe(ch)
e.mangoResultsReturned.Describe(ch)
e.mangoQueryTime.Describe(ch)
e.mangoEvaluateSelectors.Describe(ch)
e.mangoEvaluateSelectors.Describe(ch)
}

func (e *Exporter) resetAllMetrics() {
Expand Down Expand Up @@ -272,7 +272,6 @@ func (e *Exporter) resetAllMetrics() {
e.mangoResultsReturned,
e.mangoQueryTime,
e.mangoEvaluateSelectors,

}
e.resetMetrics(metrics)
}
Expand Down
19 changes: 9 additions & 10 deletions lib/couchdb-stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,17 @@ type CouchdbStats struct {
Httpd Httpd `json:"httpd"`
HttpdRequestMethods HttpdRequestMethods `json:"httpd_request_methods"`
HttpdStatusCodes HttpdStatusCodes `json:"httpd_status_codes"`

}

type MangoStats struct {
UnindexedQueries Counter `json:"unindexed_queries"`
QueryInvalidIndex Counter `json:"query_invalid_index"`
TooManyDocs Counter `json:"too_many_docs_scanned"`
DocsExamined Counter `json:"docs_examined"`
QuorumDocsExamined Counter `json:"quorum_docs_examined"`
ResultsReturned Counter `json:"results_returned"`
QueryTime Histogram `json:"query_time"`
EvaluateSelector Counter `json:"evaluate_selector"`
UnindexedQueries Counter `json:"unindexed_queries"`
QueryInvalidIndex Counter `json:"query_invalid_index"`
TooManyDocs Counter `json:"too_many_docs_scanned"`
DocsExamined Counter `json:"docs_examined"`
QuorumDocsExamined Counter `json:"quorum_docs_examined"`
ResultsReturned Counter `json:"results_returned"`
QueryTime Histogram `json:"query_time"`
EvaluateSelector Counter `json:"evaluate_selector"`
}

type HttpdRequestMethods struct {
Expand Down Expand Up @@ -140,7 +139,7 @@ type CouchReplicator struct {

type StatsResponse struct {
Couchdb CouchdbStats `json:"couchdb"`
Mango MangoStats `json:"mango"`
Mango MangoStats `json:"mango"`
Up float64 `json:"-"`
NodeInfo NodeInfo `json:"-"`
// v1.x api
Expand Down
22 changes: 10 additions & 12 deletions lib/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,14 @@ type Exporter struct {
nodeMemoryCode *prometheus.GaugeVec
nodeMemoryEts *prometheus.GaugeVec


mangoUnindexedQueries *prometheus.GaugeVec
mangoInvalidIndexes *prometheus.GaugeVec
mangoTooManyDocs *prometheus.GaugeVec
mangoDocsExamined *prometheus.GaugeVec
mangoQuorumDocsExamined *prometheus.GaugeVec
mangoResultsReturned *prometheus.GaugeVec
mangoQueryTime *prometheus.GaugeVec
mangoEvaluateSelectors *prometheus.GaugeVec
mangoUnindexedQueries *prometheus.GaugeVec
mangoInvalidIndexes *prometheus.GaugeVec
mangoTooManyDocs *prometheus.GaugeVec
mangoDocsExamined *prometheus.GaugeVec
mangoQuorumDocsExamined *prometheus.GaugeVec
mangoResultsReturned *prometheus.GaugeVec
mangoQueryTime *prometheus.GaugeVec
mangoEvaluateSelectors *prometheus.GaugeVec

viewStaleness *prometheus.GaugeVec

Expand Down Expand Up @@ -711,7 +710,7 @@ func NewExporter(uri string, basicAuth BasicAuth, collectorConfig CollectorConfi
Name: "query_time",
Help: "length of time processing a mango query",
},
[]string{"node_name", "metric"}),
[]string{"node_name", "metric"}),

mangoEvaluateSelectors: prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Expand All @@ -720,7 +719,6 @@ func NewExporter(uri string, basicAuth BasicAuth, collectorConfig CollectorConfi
Name: "evaluate_selector",
Help: "number of mango selector evaluations",
},
[]string{"node_name"}),

[]string{"node_name"}),
}
}

0 comments on commit c28b046

Please sign in to comment.