You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2017/04/20 10:39:31 UTC
incubator-ponymail git commit: Drop redundant debug timings;
renumber comments
Repository: incubator-ponymail
Updated Branches:
refs/heads/master 491e3809d -> 5fdf2089b
Drop redundant debug timings; renumber comments
Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/5fdf2089
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/5fdf2089
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/5fdf2089
Branch: refs/heads/master
Commit: 5fdf2089b4f61b0afb6ed47f31b5c5a482897e77
Parents: 491e380
Author: Sebb <se...@apache.org>
Authored: Thu Apr 20 11:39:27 2017 +0100
Committer: Sebb <se...@apache.org>
Committed: Thu Apr 20 11:39:27 2017 +0100
----------------------------------------------------------------------
site/api/pminfo.lua | 16 +++-------------
site/api/stats.lua | 23 +++++++----------------
2 files changed, 10 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/5fdf2089/site/api/pminfo.lua
----------------------------------------------------------------------
diff --git a/site/api/pminfo.lua b/site/api/pminfo.lua
index 1d5615f..961beaf 100644
--- a/site/api/pminfo.lua
+++ b/site/api/pminfo.lua
@@ -112,10 +112,6 @@ function handle(r)
if DEBUG then
table.insert(t, r:clock() - tnow)
tnow = r:clock()
-
- -- Debug time point 4
- table.insert(t, r:clock() - tnow)
- tnow = r:clock()
end
@@ -153,7 +149,7 @@ function handle(r)
hits = doc.hits.hits
end
- -- Debug time point 5
+ -- Debug time point 4
if DEBUG then
table.insert(t, r:clock() - tnow)
tnow = r:clock()
@@ -214,7 +210,7 @@ function handle(r)
end
end
- -- Debug time point 6
+ -- Debug time point 5
if DEBUG then
table.insert(t, r:clock() - tnow)
tnow = r:clock()
@@ -229,17 +225,11 @@ function handle(r)
listdata.no_active_lists = nal
if DEBUG then
listdata.took = r:clock() - START
+ listdata.debug = t
end
listdata.activity = activity
- -- Debug time point 7
- if DEBUG then
- table.insert(t, r:clock() - tnow)
- tnow = r:clock()
- listdata.debug = t
- end
-
local output = JSON.encode(listdata)
r:ivm_set(PMINFO_CACHE_KEY, output)
r:puts(output)
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/5fdf2089/site/api/stats.lua
----------------------------------------------------------------------
diff --git a/site/api/stats.lua b/site/api/stats.lua
index 2d0398d..45c693d 100644
--- a/site/api/stats.lua
+++ b/site/api/stats.lua
@@ -319,9 +319,7 @@ function handle(r)
end
end
- -- Debug time point 3 was for slow_count
-
- -- Debug time point 4
+ -- Debug time point 2
if DEBUG then
table.insert(t, r:clock() - tnow)
tnow = r:clock()
@@ -379,7 +377,7 @@ function handle(r)
cloud[y.key] = y.doc_count
end
end
- -- Debug time point 5
+ -- Debug time point 3
if DEBUG then
table.insert(t, r:clock() - tnow)
tnow = r:clock()
@@ -496,7 +494,7 @@ function handle(r)
datespan.lastYear = tonumber(os.date("%Y", last))
datespan.lastMonth = tonumber(os.date("%m", last))
- -- Debug time point 6
+ -- Debug time point 4
if DEBUG then
table.insert(t, r:clock() - tnow)
tnow = r:clock()
@@ -571,7 +569,7 @@ function handle(r)
local h = 0
- -- Debug time point 7
+ -- Debug time point 5
if DEBUG then
table.insert(t, r:clock() - tnow)
tnow = r:clock()
@@ -710,7 +708,7 @@ function handle(r)
end
end
- -- Debug time point 8
+ -- Debug time point 6
if DEBUG then
table.insert(t, r:clock() - tnow)
tnow = r:clock()
@@ -718,7 +716,7 @@ function handle(r)
sortEmail(threads)
- -- Debug time point 9
+ -- Debug time point 7
if DEBUG then
table.insert(t, r:clock() - tnow)
tnow = r:clock()
@@ -745,18 +743,11 @@ function handle(r)
listdata.cloud = cloud
if DEBUG then
listdata.took = r:clock() - START
+ listdata.debug = t
end
listdata.numparts = allparts
listdata.unixtime = os.time()
- -- Debug time point 9
- if DEBUG then
- table.insert(t, r:clock() - tnow)
- tnow = r:clock()
-
- listdata.debug = t
- end
-
r:puts(JSON.encode(listdata))
return cross.OK