diff options
author | onefang | 2019-12-12 20:06:00 +1000 |
---|---|---|
committer | onefang | 2019-12-12 20:06:00 +1000 |
commit | c257b708fe130360ff1637e93844de3f5dfb67b1 (patch) | |
tree | 5f048d07a4b5263e0bf53995dbc4c8542a548612 | |
parent | Oops, copy-pasta error. (diff) | |
download | apt-panopticon-c257b708fe130360ff1637e93844de3f5dfb67b1.zip apt-panopticon-c257b708fe130360ff1637e93844de3f5dfb67b1.tar.gz apt-panopticon-c257b708fe130360ff1637e93844de3f5dfb67b1.tar.bz2 apt-panopticon-c257b708fe130360ff1637e93844de3f5dfb67b1.tar.xz |
Time how long it takes.
-rwxr-xr-x | apt-panopticon-report-email-web.lua | 6 | ||||
-rwxr-xr-x | apt-panopticon.lua | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index c19d211..382b14d 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua | |||
@@ -424,8 +424,10 @@ if nil == web then C("opening mirrors file - " .. e) else | |||
424 | "<img src='speed.png'>\n<br>\n<p><a href='../apt-panopticon_cgp/'>More graphs.</a> with greater detail.</p><hr>\n\n" .. | 424 | "<img src='speed.png'>\n<br>\n<p><a href='../apt-panopticon_cgp/'>More graphs.</a> with greater detail.</p><hr>\n\n" .. |
425 | "<p>The <a href='Report-email.txt'>email report</a>. " .. | 425 | "<p>The <a href='Report-email.txt'>email report</a>. " .. |
426 | "All <a href='../results'>the logs and other output</a>. " .. | 426 | "All <a href='../results'>the logs and other output</a>. " .. |
427 | "You can get the <a href='https://sledjhamr.org/cgit/apt-panopticon/about/'>source code here</a>.</p>" .. | 427 | "You can get the <a href='https://sledjhamr.org/cgit/apt-panopticon/about/'>source code here</a>.</p>\n") |
428 | "</body></html>\n") | 428 | local status, whn = APT.execute('TZ="GMT" ls -l1 --time-style="+%s" results/stamp | cut -d " " -f 6-6') |
429 | web:write( "<p>This run took " .. (os.time() - tonumber("0" .. whn:sub(2, -2))) .. " seconds.</p>" .. | ||
430 | "\n</body></html>\n") | ||
429 | web:close() | 431 | web:close() |
430 | end | 432 | end |
431 | 433 | ||
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 4a01974..d3cb7be 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -1,5 +1,7 @@ | |||
1 | #!/usr/bin/env luajit | 1 | #!/usr/bin/env luajit |
2 | 2 | ||
3 | local now = os.time() | ||
4 | |||
3 | local APT = require 'apt-panopticommon' | 5 | local APT = require 'apt-panopticommon' |
4 | local D = APT.D | 6 | local D = APT.D |
5 | local I = APT.I | 7 | local I = APT.I |
@@ -892,6 +894,7 @@ else | |||
892 | 894 | ||
893 | if nil ~= adt then os.execute('rm -fr ' .. adt .. ' 2>/dev/null') end | 895 | if nil ~= adt then os.execute('rm -fr ' .. adt .. ' 2>/dev/null') end |
894 | 896 | ||
897 | I('Total run time was ' .. (os.time() - now) .. ' seconds.') | ||
895 | APT.logPost() | 898 | APT.logPost() |
896 | APT.logFile:close() | 899 | APT.logFile:close() |
897 | end | 900 | end |