[latex3-commits] [git/LaTeX3-latex3-latex3] master: Correct benchmarking when running onces takes a long time; also fix typo (9bf203a)
Bruno Le Floch
bruno at le-floch.fr
Sun Jun 10 21:47:48 CEST 2018
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/9bf203a5bc2f5378979f1f2b277d7b6b0f087a59
>---------------------------------------------------------------
commit 9bf203a5bc2f5378979f1f2b277d7b6b0f087a59
Author: Bruno Le Floch <bruno at le-floch.fr>
Date: Sun Jun 10 15:47:48 2018 -0400
Correct benchmarking when running onces takes a long time; also fix typo
>---------------------------------------------------------------
9bf203a5bc2f5378979f1f2b277d7b6b0f087a59
l3trial/l3benchmark/l3benchmark.dtx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/l3trial/l3benchmark/l3benchmark.dtx b/l3trial/l3benchmark/l3benchmark.dtx
index 326730b..176242d 100644
--- a/l3trial/l3benchmark/l3benchmark.dtx
+++ b/l3trial/l3benchmark/l3benchmark.dtx
@@ -343,7 +343,7 @@ end
% number of operations. This can be redefined by the user.
% \begin{macrocode}
\cs_new_protected:Npn \benchmark_display:
- { \iow_term:x { \fp_to_tl:N \g_benchmark_time_fp ~ seconds } }
+ { \iow_term:x { \fp_to_tl:N \g_benchmark_time_fp \c_space_tl seconds } }
\cs_new_protected:Npn \benchmark_display_in_ops:
{
\iow_term:x
@@ -567,7 +567,10 @@ end
\int_gset:Nn \g_@@_repeat_int { 1 }
\@@_raw:nN { \g_@@_code_tl } \g_@@_time_int
\int_compare:nNnF \g_@@_time_int < { \g_@@_duration_int / 2 }
- { \prg_break: }
+ {
+ \int_gset_eq:NN \g_@@_time_median_int \g_@@_time_int
+ \prg_break:
+ }
\int_while_do:nNnn \g_@@_time_int < { \g_@@_duration_int / 100 }
{
\int_compare:nNnT \g_@@_repeat_int > { \c_max_int / 4 }
More information about the latex3-commits
mailing list