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 // docsExamined is renamed from nscannedObjects in 3.2.0
// https://docs.mongodb.com/manual/reference/database-profiler/#system.profile.docsExamined
type SystemProfile struct { type SystemProfile struct {
AllUsers []interface{} `bson:"allUsers"` AllUsers []interface{} `bson:"allUsers"`
Client string `bson:"client"` Client string `bson:"client"`

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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