From c257b708fe130360ff1637e93844de3f5dfb67b1 Mon Sep 17 00:00:00 2001 From: onefang Date: Thu, 12 Dec 2019 20:06:00 +1000 Subject: Time how long it takes. --- apt-panopticon-report-email-web.lua | 6 ++++-- 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 "\n
\n

More graphs. with greater detail.


\n\n" .. "

The email report.   " .. "All the logs and other output.   " .. - "You can get the source code here.

" .. - "\n") + "You can get the source code here.

\n") + local status, whn = APT.execute('TZ="GMT" ls -l1 --time-style="+%s" results/stamp | cut -d " " -f 6-6') + web:write( "

This run took " .. (os.time() - tonumber("0" .. whn:sub(2, -2))) .. " seconds.

" .. + "\n\n") web:close() end 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 @@ #!/usr/bin/env luajit +local now = os.time() + local APT = require 'apt-panopticommon' local D = APT.D local I = APT.I @@ -892,6 +894,7 @@ else if nil ~= adt then os.execute('rm -fr ' .. adt .. ' 2>/dev/null') end + I('Total run time was ' .. (os.time() - now) .. ' seconds.') APT.logPost() APT.logFile:close() end -- cgit v1.1