File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
toolset/databases/mongodb Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ RUN apt-get -yqq update && \
31
31
colorama==0.3.1 \
32
32
docker==7.0.0 \
33
33
mysqlclient==2.2.4 \
34
- pymongo==3.13.0
34
+ pymongo==4.7.2
35
35
36
36
# Collect resource usage statistics
37
37
ARG DOOL_VERSION=v1.3.1
Original file line number Diff line number Diff line change
1
+ import bson
1
2
import pymongo
2
3
import traceback
3
4
@@ -52,19 +53,19 @@ def test_connection(cls, config):
52
53
@classmethod
53
54
def get_queries (cls , config ):
54
55
co = cls .get_connection (config )
55
- status = co .admin .command (pymongo . son_manipulator .SON ([('serverStatus' , 1 )]))
56
+ status = co .admin .command (bson . son .SON ([('serverStatus' , 1 )]))
56
57
return int (status ["opcounters" ]["query" ]) + int (status ["opcounters" ]["update" ]) #get_queries returns all the queries
57
58
58
59
@classmethod
59
60
def get_rows (cls , config ):
60
61
co = cls .get_connection (config )
61
- status = co .admin .command (pymongo . son_manipulator .SON ([('serverStatus' , 1 )]))
62
+ status = co .admin .command (bson . son .SON ([('serverStatus' , 1 )]))
62
63
return int (status ["opcounters" ]["query" ]) * cls .get_rows_per_query (co )
63
64
64
65
@classmethod
65
66
def get_rows_updated (cls , config ):
66
67
co = cls .get_connection (config )
67
- status = co .admin .command (pymongo . son_manipulator .SON ([('serverStatus' , 1 )]))
68
+ status = co .admin .command (bson . son .SON ([('serverStatus' , 1 )]))
68
69
return int (status ["opcounters" ]["update" ]) * cls .get_rows_per_query (co )
69
70
70
71
@classmethod
You can’t perform that action at this time.
0 commit comments