]> arthur.barton.de Git - netdata.git/commitdiff
fix wrongly calculated run time
authorpaulfantom <paulfantom@gmail.com>
Fri, 10 Jun 2016 13:44:29 +0000 (15:44 +0200)
committerpaulfantom <paulfantom@gmail.com>
Fri, 10 Jun 2016 13:44:29 +0000 (15:44 +0200)
plugins.d/python.d.plugin

index 480fa58c10d413480593bd659d8fae12d22203f9..667b41311ef8a514ea755f58e821aca7e2248d89 100755 (executable)
@@ -106,7 +106,7 @@ class PythonCharts(object):
     def update_module(self,mod):
         t1 = time.time()
         try:
-#            t=int((t1- self.timetable[mod.__name__]) * 1000000)
+#            t=int((t1- self.timetable[mod.__name__]) * 1000)
 #            if t == 0: t=""
             t = "" #FIXME
             if not mod.update(t):
@@ -124,7 +124,7 @@ class PythonCharts(object):
 #        if dt == 0: dt=""
         dt="" #FIXME
         sys.stdout.write("BEGIN netdata.plugin_pythond_"+mod.__name__+" "+str(dt)+'\n')
-        sys.stdout.write("SET run_time = "+str(int((t2 - t1))*1000)+'\n')
+        sys.stdout.write("SET run_time = "+str(int((t2 - t1)*1000))+'\n')
         sys.stdout.write("END\n")
         sys.stdout.flush()
         self.timetable[mod.__name__] = t1