fix tests

This commit is contained in:
Kamil Dziedzic
2017-09-14 22:18:39 +02:00
parent 932f192f93
commit 65b99c905d
14 changed files with 24 additions and 22 deletions

View File

@@ -8,6 +8,7 @@ import (
)
// docsExamined is renamed from nscannedObjects in 3.2.0
// https://docs.mongodb.com/manual/reference/database-profiler/#system.profile.docsExamined
type SystemProfile struct {
AllUsers []interface{} `bson:"allUsers"`
Client string `bson:"client"`

View File

@@ -91,6 +91,7 @@ func (s *Stats) Add(doc proto.SystemProfile) error {
}
qiac.Count++
// docsExamined is renamed from nscannedObjects in 3.2.0.
// https://docs.mongodb.com/manual/reference/database-profiler/#system.profile.docsExamined
if doc.NscannedObjects > 0 {
qiac.NScanned = append(qiac.NScanned, float64(doc.NscannedObjects))
} else {

View File

@@ -186,8 +186,8 @@
0
],
"NScanned": [
0,
0
1,
1
],
"QueryTime": [
0,
@@ -672,7 +672,7 @@
1
],
"NScanned": [
0
44
],
"QueryTime": [
0
@@ -701,8 +701,8 @@
49
],
"NScanned": [
0,
0,
49,
49,
49,
49,
49
@@ -742,8 +742,8 @@
6
],
"NScanned": [
0,
0,
6,
6,
6,
6,
6
@@ -783,8 +783,8 @@
0
],
"NScanned": [
0,
0,
98,
98,
49,
49,
49
@@ -885,8 +885,8 @@
0
],
"NScanned": [
0,
0,
1,
1,
1,
1,
1

View File

@@ -15,7 +15,7 @@
1
],
"NScanned": [
0
44
],
"QueryTime": [
0

View File

@@ -15,7 +15,7 @@
6
],
"NScanned": [
0
6
],
"QueryTime": [
0

View File

@@ -15,7 +15,7 @@
6
],
"NScanned": [
0
6
],
"QueryTime": [
0

View File

@@ -15,7 +15,7 @@
0
],
"NScanned": [
0
98
],
"QueryTime": [
0

View File

@@ -15,7 +15,7 @@
0
],
"NScanned": [
0
98
],
"QueryTime": [
0

View File

@@ -15,7 +15,7 @@
49
],
"NScanned": [
0
49
],
"QueryTime": [
0

View File

@@ -15,7 +15,7 @@
49
],
"NScanned": [
0
49
],
"QueryTime": [
0

View File

@@ -15,7 +15,7 @@
0
],
"NScanned": [
0
1
],
"QueryTime": [
0

View File

@@ -15,7 +15,7 @@
0
],
"NScanned": [
0
1
],
"QueryTime": [
0

View File

@@ -15,7 +15,7 @@
0
],
"NScanned": [
0
1
],
"QueryTime": [
0

View File

@@ -15,7 +15,7 @@
0
],
"NScanned": [
0
1
],
"QueryTime": [
0