summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/mlib-run.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/mlib-run.lua')
-rw-r--r--tex/context/base/mkiv/mlib-run.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/mlib-run.lua b/tex/context/base/mkiv/mlib-run.lua
index 5aa9c78d0..602d6f36c 100644
--- a/tex/context/base/mkiv/mlib-run.lua
+++ b/tex/context/base/mkiv/mlib-run.lua
@@ -661,20 +661,21 @@ do
end
+local getstatistics = mplib.getstatistics or mplib.statistics
+
function metapost.getstatistics(memonly)
if memonly then
local n, m = 0, 0
for name, mpx in next, mpxformats do
n = n + 1
- m = m + mpx:statistics().memory
+ m = m + getstatistics(mpx).memory
end
return n, m
else
local t = { }
for name, mpx in next, mpxformats do
- t[name] = mpx:statistics()
+ t[name] = getstatistics(mpx)
end
return t
end
end
-