I want to show how to measure time with sage, sagetex and the environment sagecommandline.
Here is a minimal example:
\documentclass[a6paper,DIV=16]{scrartcl}
\pagestyle{empty}
\usepackage{sagetex}
% arara: lualatex
% arara: sagetex
% arara: lualatex
% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = sage
\begin{document}
\begin{sagecommandline}
sage: factorial(10)
sage: %time factorial(10)
sage: \percent time factorial(10)
\end{sagecommandline}
\end{document}
But neither %time nor \percent produce the desired output.
Is it possible to include the output, which contains microseconds? On my machine e.g.:
CPU times: user 11 µs, sys: 0 ns, total: 11 µs Wall time: 14.1 µs 3628800
\begingroup\catcode\%=12before your\begin{sagecommandline}and\endgroupafter\end{sagecommandline}`. – Skillmon Aug 30 '20 at 15:33\%in my first comment. Did you try with the additional tick? – Skillmon Aug 30 '20 at 15:34sagetexnor do I have it on my machine... It was just a guess :) – Skillmon Aug 30 '20 at 16:03