diff options
Diffstat (limited to 'tex/context/base/mlib-ctx.lua')
-rw-r--r-- | tex/context/base/mlib-ctx.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tex/context/base/mlib-ctx.lua b/tex/context/base/mlib-ctx.lua index 4d4e25a3d..2b16af28e 100644 --- a/tex/context/base/mlib-ctx.lua +++ b/tex/context/base/mlib-ctx.lua @@ -41,8 +41,15 @@ end statistics.register("metapost processing time", function() local n = metapost.n if n > 0 then - return format("%s seconds, loading: %s seconds, execution: %s seconds, n: %s", - statistics.elapsedtime(metapost), statistics.elapsedtime(mplib), statistics.elapsedtime(metapost.exectime),n) + local e = metapost.externals.n + local str = format("%s seconds, loading: %s seconds, execution: %s seconds, n: %s", + statistics.elapsedtime(metapost), statistics.elapsedtime(mplib), + statistics.elapsedtime(metapost.exectime), n) + if e > 0 then + return format("%s, external: %s seconds (%s calls)", str, statistics.elapsedtime(metapost.externals), e) + else + return str + end else return nil end |