@@ -127,9 +127,19 @@ type ConcurrentTransStats struct {
127
127
128
128
// CacheStats stores cache statistics for WiredTiger.
129
129
type CacheStats struct {
130
- TrackedDirtyBytes int64 `bson:"tracked dirty bytes in the cache"`
131
- CurrentCachedBytes int64 `bson:"bytes currently in the cache"`
132
- MaxBytesConfigured int64 `bson:"maximum bytes configured"`
130
+ TrackedDirtyBytes int64 `bson:"tracked dirty bytes in the cache"`
131
+ CurrentCachedBytes int64 `bson:"bytes currently in the cache"`
132
+ MaxBytesConfigured int64 `bson:"maximum bytes configured"`
133
+ AppThreadsPageReadCount int64 `bson:"application threads page read from disk to cache count"`
134
+ AppThreadsPageReadTime int64 `bson:"application threads page read from disk to cache time (usecs)"`
135
+ AppThreadsPageWriteCount int64 `bson:"application threads page write from cache to disk count"`
136
+ AppThreadsPageWriteTime int64 `bson:"application threads page write from cache to disk time (usecs)"`
137
+ BytesWrittenFrom int64 `bson:"bytes written from cache"`
138
+ BytesReadInto int64 `bson:"bytes read into cache"`
139
+ PagesEvictedByAppThread int64 `bson:"pages evicted by application threads"`
140
+ PagesQueuedForEviction int64 `bson:"pages queued for eviction"`
141
+ ServerEvictingPages int64 `bson:"eviction server evicting pages"`
142
+ WorkerThreadEvictingPages int64 `bson:"eviction worker thread evicting pages"`
133
143
}
134
144
135
145
// TransactionStats stores transaction checkpoints in WiredTiger.
@@ -406,6 +416,20 @@ type StatLine struct {
406
416
CacheDirtyPercent float64
407
417
CacheUsedPercent float64
408
418
419
+ // Cache ultilization extended (wiredtiger only)
420
+ TrackedDirtyBytes int64
421
+ CurrentCachedBytes int64
422
+ MaxBytesConfigured int64
423
+ AppThreadsPageReadCount int64
424
+ AppThreadsPageReadTime int64
425
+ AppThreadsPageWriteCount int64
426
+ BytesWrittenFrom int64
427
+ BytesReadInto int64
428
+ PagesEvictedByAppThread int64
429
+ PagesQueuedForEviction int64
430
+ ServerEvictingPages int64
431
+ WorkerThreadEvictingPages int64
432
+
409
433
// Replicated Opcounter fields
410
434
InsertR , QueryR , UpdateR , DeleteR , GetMoreR , CommandR int64
411
435
ReplLag int64
@@ -534,6 +558,19 @@ func NewStatLine(oldMongo, newMongo MongoStatus, key string, all bool, sampleSec
534
558
returnVal .Flushes = newStat .WiredTiger .Transaction .TransCheckpoints - oldStat .WiredTiger .Transaction .TransCheckpoints
535
559
returnVal .CacheDirtyPercent = float64 (newStat .WiredTiger .Cache .TrackedDirtyBytes ) / float64 (newStat .WiredTiger .Cache .MaxBytesConfigured )
536
560
returnVal .CacheUsedPercent = float64 (newStat .WiredTiger .Cache .CurrentCachedBytes ) / float64 (newStat .WiredTiger .Cache .MaxBytesConfigured )
561
+
562
+ returnVal .TrackedDirtyBytes = newStat .WiredTiger .Cache .TrackedDirtyBytes
563
+ returnVal .CurrentCachedBytes = newStat .WiredTiger .Cache .CurrentCachedBytes
564
+ returnVal .MaxBytesConfigured = newStat .WiredTiger .Cache .MaxBytesConfigured
565
+ returnVal .AppThreadsPageReadCount = newStat .WiredTiger .Cache .AppThreadsPageReadCount
566
+ returnVal .AppThreadsPageReadTime = newStat .WiredTiger .Cache .AppThreadsPageReadTime
567
+ returnVal .AppThreadsPageWriteCount = newStat .WiredTiger .Cache .AppThreadsPageWriteCount
568
+ returnVal .BytesWrittenFrom = newStat .WiredTiger .Cache .BytesWrittenFrom
569
+ returnVal .BytesReadInto = newStat .WiredTiger .Cache .BytesReadInto
570
+ returnVal .PagesEvictedByAppThread = newStat .WiredTiger .Cache .PagesEvictedByAppThread
571
+ returnVal .PagesQueuedForEviction = newStat .WiredTiger .Cache .PagesQueuedForEviction
572
+ returnVal .ServerEvictingPages = newStat .WiredTiger .Cache .ServerEvictingPages
573
+ returnVal .WorkerThreadEvictingPages = newStat .WiredTiger .Cache .WorkerThreadEvictingPages
537
574
} else if newStat .BackgroundFlushing != nil && oldStat .BackgroundFlushing != nil {
538
575
returnVal .Flushes = newStat .BackgroundFlushing .Flushes - oldStat .BackgroundFlushing .Flushes
539
576
}
0 commit comments