|
|
@@ -12,15 +12,21 @@ import time
|
|
12
|
12
|
|
|
13
|
13
|
GNUPLOT_COMMON = 'set terminal png transparent\nset size 0.5,0.5\n'
|
|
14
|
14
|
|
|
|
15
|
+exectime_internal = 0.0
|
|
|
16
|
+exectime_external = 0.0
|
|
|
17
|
+time_start = time.time()
|
|
|
18
|
+
|
|
15
|
19
|
def getoutput(cmd, quiet = False):
|
|
|
20
|
+ global exectime_external
|
|
|
21
|
+ start = time.time()
|
|
16
|
22
|
if not quiet:
|
|
17
|
|
- start = time.time()
|
|
18
|
23
|
print '>> %s' % cmd,
|
|
19
|
24
|
sys.stdout.flush()
|
|
20
|
25
|
output = commands.getoutput(cmd)
|
|
|
26
|
+ end = time.time()
|
|
21
|
27
|
if not quiet:
|
|
22
|
|
- end = time.time()
|
|
23
|
28
|
print '\r[%.5f] >> %s' % (end - start, cmd)
|
|
|
29
|
+ exectime_external += (end - start)
|
|
24
|
30
|
return output
|
|
25
|
31
|
|
|
26
|
32
|
def getkeyssortedbyvalues(dict):
|
|
|
@@ -813,3 +819,6 @@ print 'Generating report...'
|
|
813
|
819
|
report = HTMLReportCreator()
|
|
814
|
820
|
report.create(data, outputpath)
|
|
815
|
821
|
|
|
|
822
|
+time_end = time.time()
|
|
|
823
|
+exectime_internal = time_end - time_start
|
|
|
824
|
+print 'Execution time %.5f secs, %.5f secs (%.2f %%) in external commands)' % (exectime_internal, exectime_external, (100.0 * exectime_external) / exectime_internal)
|