speed optimizations
paulfantom committed
Jul 13, 2016 at 15:02 UTC
95befcbab3e7a03989220397f1578be316f46e70
1 file changed
+5
-3
python.d/python_modules/base.py
+5
-3
@@ -6,6 +6,7 @@ import time
6
import sys
7
import os
8
import socket
9
+import resource
10
try:
11
import urllib.request as urllib2
12
except ImportError:
@@ -116,9 +117,10 @@ class BaseService(threading.Thread):
117
#run_time_chart = "BEGIN netdata.plugin_pythond_" + self.chart_name + " " + str(since_last) + '\n'
118
#run_time_chart += "SET run_time = " + run_time + '\n'
119
#run_time_chart += "END\n"
119
- run_time_chart = "BEGIN netdata.plugin_pythond_%s %s\nSET run_time = %s\nEND\n" % \
120
- (self.chart_name, str(since_last), run_time)
121
- sys.stdout.write(run_time_chart)
120
+ #sys.stdout.write(run_time_chart)
121
+ sys.stdout.write("BEGIN netdata.plugin_pythond_%s %s\nSET run_time = %s\nEND\n" % \
122
+ (self.chart_name, str(since_last), run_time))
123
+
124
#msg.debug(self.chart_name + " updated in " + str(run_time) + " ms")
125
msg.debug(self.chart_name, "updated in", str(run_time), "ms")
126
self.timetable['last'] = t_start