summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2007-06-14 17:15:25 +0000
committerUrban Müller2007-06-14 17:15:25 +0000
commitd382ff414092c1988e61df2464570eac2667fbf8 (patch)
tree7ae19e7fca3874c5950bb43ace60a08df33af6bd /it.class
parentf22ab12b3799dcc36b76cb5ef43594675b131d28 (diff)
downloaditools-d382ff414092c1988e61df2464570eac2667fbf8.tar.gz
itools-d382ff414092c1988e61df2464570eac2667fbf8.tar.bz2
itools-d382ff414092c1988e61df2464570eac2667fbf8.zip
add timings to exec log
Diffstat (limited to 'it.class')
-rw-r--r--it.class9
1 files changed, 7 insertions, 2 deletions
diff --git a/it.class b/it.class
index ae4bc87..ea8f0b1 100644
--- a/it.class
+++ b/it.class
@@ -324,9 +324,14 @@ function exec(/* $cmd, $values1 = array(), ... */)
$cmd = str_replace($tag, join(" ", $parts), $cmd);
}
- it::log('exec', $cmd);
+ $s = gettimeofday();
+ $result = EDC('noexec') ? "" : (string)shell_exec($cmd);
+ $e = gettimeofday();
+ $msec= intval(($e['sec'] - $s['sec']) * 1000 + ($e['usec'] - $s['usec']) / 1000);
- return EDC('noexec') ? "" : (string)shell_exec($cmd);
+ it::log('exec', "$msec\t$cmd");
+
+ return $result;
}
function _exec_quotevalue($value)