File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 29
29
import struct
30
30
from copy import copy
31
31
32
+ try :
33
+ # Memory tracker
34
+ from pympler import tracker
35
+ with_pympler = True
36
+ except Exception as e :
37
+ with_pympler = False
38
+
39
+
32
40
try :
33
41
from progress .bar import Bar
34
42
with_progress = True
@@ -965,7 +973,9 @@ def print_usage(exitcode, reason=None):
965
973
sys .exit (exitcode )
966
974
967
975
968
- if __name__ == '__main__' :
976
+ def run ():
977
+ """Run integration tests"""
978
+
969
979
modes = list ()
970
980
971
981
# Parse options
@@ -1036,3 +1046,17 @@ def print_usage(exitcode, reason=None):
1036
1046
verify_admin ()
1037
1047
1038
1048
print ('=' * 30 , 'Done' , '=' * 30 )
1049
+
1050
+
1051
+ if __name__ == '__main__' :
1052
+ if with_pympler :
1053
+ tr = tracker .SummaryTracker ()
1054
+ print ('Running with pympler memory tracker' )
1055
+
1056
+ # Run tests
1057
+ run ()
1058
+
1059
+ if with_pympler :
1060
+ gc .collect ()
1061
+ print ('Memory tracker results' )
1062
+ tr .print_diff ()
You can’t perform that action at this time.
0 commit comments