percona / mongodb_exporter
Showing 1 of 1 files from the diff.

@@ -168,6 +168,15 @@
Loading
168 168
	}, []string{"type"})
169 169
)
170 170
171 +
var (
172 +
	wtConnectionFilesOpen = prometheus.NewGauge(prometheus.GaugeOpts{
173 +
		Namespace: Namespace,
174 +
		Subsystem: "wiredtiger_connection",
175 +
		Name:      "files_open_total",
176 +
		Help:      "The total number of files opened in WiredTiger",
177 +
	})
178 +
)
179 +
171 180
// blockmanager stats
172 181
type WTBlockManagerStats struct {
173 182
	MappedBytesRead  float64 `bson:"mapped bytes read"`
@@ -359,6 +368,19 @@
Loading
359 368
	wtConcurrentTransactionsTotalTickets.Describe(ch)
360 369
}
361 370
371 +
// connection stats
372 +
type WTConnectionStats struct {
373 +
	FilesOpen float64 `bson:"files currently open"`
374 +
}
375 +
376 +
func (stats *WTConnectionStats) Export(ch chan<- prometheus.Metric) {
377 +
	wtConnectionFilesOpen.Set(stats.FilesOpen)
378 +
}
379 +
380 +
func (stats *WTConnectionStats) Describe(ch chan<- *prometheus.Desc) {
381 +
	wtConnectionFilesOpen.Describe(ch)
382 +
}
383 +
362 384
// WiredTiger stats
363 385
type WiredTigerStats struct {
364 386
	BlockManager           *WTBlockManagerStats           `bson:"block-manager"`
@@ -367,6 +389,7 @@
Loading
367 389
	Session                *WTSessionStats                `bson:"session"`
368 390
	Transaction            *WTTransactionStats            `bson:"transaction"`
369 391
	ConcurrentTransactions *WTConcurrentTransactionsStats `bson:"concurrentTransactions"`
392 +
	Connection             *WTConnectionStats             `bson:"connection"`
370 393
}
371 394
372 395
func (stats *WiredTigerStats) Describe(ch chan<- *prometheus.Desc) {
@@ -388,6 +411,9 @@
Loading
388 411
	if stats.ConcurrentTransactions != nil {
389 412
		stats.ConcurrentTransactions.Describe(ch)
390 413
	}
414 +
	if stats.Connection != nil {
415 +
		stats.Connection.Describe(ch)
416 +
	}
391 417
}
392 418
393 419
func (stats *WiredTigerStats) Export(ch chan<- prometheus.Metric) {
@@ -409,6 +435,9 @@
Loading
409 435
	if stats.ConcurrentTransactions != nil {
410 436
		stats.ConcurrentTransactions.Export(ch)
411 437
	}
438 +
	if stats.Connection != nil {
439 +
		stats.Connection.Export(ch)
440 +
	}
412 441
413 442
	wtCachePages.Collect(ch)
414 443
	wtCacheBytes.Collect(ch)
@@ -424,4 +453,6 @@
Loading
424 453
	wtConcurrentTransactionsOut.Collect(ch)
425 454
	wtConcurrentTransactionsAvailable.Collect(ch)
426 455
	wtConcurrentTransactionsTotalTickets.Collect(ch)
456 +
457 +
	wtConnectionFilesOpen.Collect(ch)
427 458
}
Files Coverage
collector 7.50%
shared 45.12%
mongodb_exporter.go 34.62%
Project Totals (48 files) 10.58%
1067.1
1.14.x=-X.14.x
TRAVIS_OS_NAME=linux
1067.4
1.14.x=-X.14.x
TRAVIS_OS_NAME=linux
1067.6
1.14.x=-X.14.x
TRAVIS_OS_NAME=linux
1067.2
1.14.x=-X.14.x
TRAVIS_OS_NAME=linux
1067.7
TRAVIS_OS_NAME=linux
tip=
1067.8
TRAVIS_OS_NAME=linux
tip=
1067.10
TRAVIS_OS_NAME=linux
tip=
1067.9
TRAVIS_OS_NAME=linux
tip=
1067.11
TRAVIS_OS_NAME=linux
tip=

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading