Add page_faults for mongodb wired tiger (#6732)
This commit is contained in:
parent
1f5be2bac7
commit
e6c57e7df4
|
@ -248,6 +248,7 @@ func (d *MongodbData) AddDefaultStats() {
|
||||||
d.add(key, floatVal)
|
d.add(key, floatVal)
|
||||||
}
|
}
|
||||||
d.addStat(statLine, WiredTigerExtStats)
|
d.addStat(statLine, WiredTigerExtStats)
|
||||||
|
d.add("page_faults", d.StatLine.FaultsCnt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,7 @@ func TestAddWiredTigerStats(t *testing.T) {
|
||||||
PagesQueuedForEviction: 0,
|
PagesQueuedForEviction: 0,
|
||||||
ServerEvictingPages: 0,
|
ServerEvictingPages: 0,
|
||||||
WorkerThreadEvictingPages: 0,
|
WorkerThreadEvictingPages: 0,
|
||||||
|
FaultsCnt: 204,
|
||||||
},
|
},
|
||||||
tags,
|
tags,
|
||||||
)
|
)
|
||||||
|
@ -116,6 +117,8 @@ func TestAddWiredTigerStats(t *testing.T) {
|
||||||
for key := range WiredTigerExtStats {
|
for key := range WiredTigerExtStats {
|
||||||
assert.True(t, acc.HasFloatField("mongodb", key) || acc.HasInt64Field("mongodb", key), key)
|
assert.True(t, acc.HasFloatField("mongodb", key) || acc.HasInt64Field("mongodb", key), key)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert.True(t, acc.HasInt64Field("mongodb", "page_faults"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestAddShardStats(t *testing.T) {
|
func TestAddShardStats(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue