projects
/
profiler-torch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
384ad91
)
OCD cosmetics.
author
Francois Fleuret
<francois@fleuret.org>
Mon, 19 Dec 2016 16:19:39 +0000
(17:19 +0100)
committer
Francois Fleuret
<francois@fleuret.org>
Mon, 19 Dec 2016 16:19:39 +0000
(17:19 +0100)
profiler.lua
patch
|
blob
|
history
diff --git
a/profiler.lua
b/profiler.lua
index
231a7c9
..
d61e5db
100644
(file)
--- a/
profiler.lua
+++ b/
profiler.lua
@@
-55,7
+55,7
@@
function profiler.decorate(model, functionsToDecorate)
.. tostring(model))
end
.. tostring(model))
end
- local toDecorate =
model
+ local toDecorate =
getmetatable(model)
while not rawget(toDecorate, name) do
toDecorate = getmetatable(toDecorate)
while not rawget(toDecorate, name) do
toDecorate = getmetatable(toDecorate)
@@
-123,14
+123,13
@@
function profiler.print(model, nbSamples, totalTime, indent)
hint = ' '
else
if profiler.color then
hint = ' '
else
if profiler.color then
- hint = '
'
+ hint = '
' .. profiler.colors('red')
else
else
- hint = '*'
+ hint = '*
'
end
end
- hint = hint .. profiler.colors('red')
end
end
- print(profiler.timingString(indent .. hint ..
' ' ..
model.__typename,
+ print(profiler.timingString(indent .. hint .. model.__typename,
localTotal, nbSamples, totalTime))
for l, t in pairs(model.accTime) do
localTotal, nbSamples, totalTime))
for l, t in pairs(model.accTime) do