aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-12-12 20:06:00 +1000
committeronefang2019-12-12 20:06:00 +1000
commitc257b708fe130360ff1637e93844de3f5dfb67b1 (patch)
tree5f048d07a4b5263e0bf53995dbc4c8542a548612
parentOops, copy-pasta error. (diff)
downloadapt-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-xapt-panopticon-report-email-web.lua6
-rwxr-xr-xapt-panopticon.lua3
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>. &nbsp; " .. 425 "<p>The <a href='Report-email.txt'>email report</a>. &nbsp; " ..
426 "All <a href='../results'>the logs and other output</a>. &nbsp; " .. 426 "All <a href='../results'>the logs and other output</a>. &nbsp; " ..
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()
430end 432end
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
3local now = os.time()
4
3local APT = require 'apt-panopticommon' 5local APT = require 'apt-panopticommon'
4local D = APT.D 6local D = APT.D
5local I = APT.I 7local 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()
897end 900end