[latex3-commits] [latex3/latex3] develop: Drop benchmark test 001 (fixes #1289) (b455c4b0f)
github at latex-project.org
github at latex-project.org
Tue Nov 12 15:21:08 CET 2024
Repository : https://github.com/latex3/latex3
On branch : develop
Link : https://github.com/latex3/latex3/commit/b455c4b0fcd16c575fd2dddd97cc7e5f53009fd0
>---------------------------------------------------------------
commit b455c4b0fcd16c575fd2dddd97cc7e5f53009fd0
Author: Joseph Wright <joseph at texdev.net>
Date: Tue Nov 12 14:21:08 2024 +0000
Drop benchmark test 001 (fixes #1289)
As we get non-deterministic results.
>---------------------------------------------------------------
b455c4b0fcd16c575fd2dddd97cc7e5f53009fd0
.../l3benchmark/testfiles/m3benchmark001.lvt | 103 ---------------------
.../l3benchmark/testfiles/m3benchmark001.tlg | 39 --------
2 files changed, 142 deletions(-)
diff --git a/l3experimental/l3benchmark/testfiles/m3benchmark001.lvt b/l3experimental/l3benchmark/testfiles/m3benchmark001.lvt
deleted file mode 100644
index 27ed57f4c..000000000
--- a/l3experimental/l3benchmark/testfiles/m3benchmark001.lvt
+++ /dev/null
@@ -1,103 +0,0 @@
-%
-% Copyright (C) The LaTeX Project
-%
-
-\documentclass{minimal}
-\input{regression-test}
-
-\RequirePackage{l3benchmark}
-\ExplSyntaxOn
-\debug_on:n { check-declarations , deprecation , log-functions }
-\ExplSyntaxOff
-
-\START
-\ExplSyntaxOn
-
-\sys_if_timer_exist:F
- {
- \benchmark_once:n \ERROR \TRUE
- \benchmark:n \ERROR \TRUE
- \benchmark_tic: \TRUE
- \benchmark_toc: \TRUE
- \END
- }
-
-\fp_gset:Nn \g_benchmark_duration_target_fp { 0.01 }
-
-\OMIT
-\exp_args:NNe \seq_set_from_clist:Nn \l_tmpa_seq
- { \prg_replicate:nn { 123 } { a , } }
-\cs_new_protected:Npn \test_slow_code:
- { \seq_reverse:N \l_tmpa_seq }
-\cs_new_protected:Npn \test_disable_iow:n #1
- {
- \group_begin:
- \cs_set_eq:NN \iow_term:e \use_none:n
- #1
- \group_end:
- }
-\TIMO
-
-\TEST { benchmark_once }
- {
- \int_gzero:N \g_tmpa_int
- \test_disable_iow:n { \benchmark_once:n { \int_gincr:N \g_tmpa_int } }
- \int_log:N \g_tmpa_int % Check the code was done only once
- \fp_compare:nTF { \g_benchmark_time_fp < 5e-5 } % Check it took 0 to 3 scaled seconds
- { \TRUE }
- { \ERROR \fp_show:N \g_benchmark_time_fp }
- }
-
-\TEST { benchmark }
- {
- \clist_clear:N \l_tmpa_clist
- \clist_clear:N \l_tmpb_clist
- \prg_replicate:nn { 3 }
- {
- \test_disable_iow:n { \benchmark:n { \test_slow_code: } }
- \clist_put_right:Ne \l_tmpa_clist { \fp_to_tl:N \g_benchmark_time_fp }
- \test_disable_iow:n { \benchmark:n { \test_slow_code: \test_slow_code: } }
- \clist_put_right:Ne \l_tmpb_clist { \fp_to_tl:N \g_benchmark_time_fp }
- }
- \fp_compare:nTF % Check that doing code twice takes between 1.5 and 2.5 times as much
- {
- (1.5 * min ( \l_tmpa_clist ) <= max ( \l_tmpb_clist ))
- && (2.5 * max ( \l_tmpa_clist ) >= min ( \l_tmpb_clist ))
- }
- { \TRUE }
- {
- \ERROR
- \TYPE { 1:\l_tmpa_clist }
- \TYPE { 2:\l_tmpb_clist }
- }
- }
-
-\OMIT
-\cs_new_protected:Npn \test_reset_time_at_iow:n #1
- {
- \group_begin:
- \cs_set_eq:NN \test_iow_term:e \iow_term:e
- \cs_set_protected:Npn \iow_term:e
- {
- \fp_gset:Nn \g_benchmark_time_fp { 1.2 }
- \test_iow_term:e
- }
- #1
- \group_end:
- }
-\TIMO
-
-\TEST { tic/toc }
- {
- \benchmark_toc:
- \benchmark_toc:
- \int_gzero:N \g_tmpa_int
- \group_begin:
- \prg_replicate:nn { 3 } { \benchmark_tic: }
- \int_gincr:N \g_tmpa_int
- \group_end:
- \test_reset_time_at_iow:n { \prg_replicate:nn { 3 } { \benchmark_toc: } }
- \int_compare:nNnF \g_tmpa_int = 1 { \ERROR } % Check the code was done only once
- }
-
-\END
diff --git a/l3experimental/l3benchmark/testfiles/m3benchmark001.tlg b/l3experimental/l3benchmark/testfiles/m3benchmark001.tlg
deleted file mode 100644
index 97fb2c76e..000000000
--- a/l3experimental/l3benchmark/testfiles/m3benchmark001.tlg
+++ /dev/null
@@ -1,39 +0,0 @@
-This is a generated file for the LaTeX (2e + expl3) validation system.
-Don't change this file in any respect.
-============================================================
-TEST 1: benchmark_once
-============================================================
-Defining \g__benchmark_1_int on line ...
-\g__benchmark_1_int=\count...
-> \g_tmpa_int=1.
-TRUE
-============================================================
-============================================================
-TEST 2: benchmark
-============================================================
-TRUE
-============================================================
-============================================================
-TEST 3: tic/toc
-============================================================
-! Package benchmark Error: \benchmark_toc: without \benchmark_tic: !
-Type <return> to continue.
- ...
-l. ... }
-LaTeX does not know anything more about this error, sorry.
-Try typing <return> to proceed.
-If that doesn't work, type X <return> to quit.
-! Package benchmark Error: \benchmark_toc: without \benchmark_tic: !
-Type <return> to continue.
- ...
-l. ... }
-LaTeX does not know anything more about this error, sorry.
-Try typing <return> to proceed.
-If that doesn't work, type X <return> to quit.
-(l3benchmark) + TIC
-(l3benchmark) +-+ TIC
-(l3benchmark) +-+-+ TIC
-(l3benchmark) +-+-+ TOC: 1.2 s
-(l3benchmark) +-+ TOC: 1.2 s
-(l3benchmark) + TOC: 1.2 s
-============================================================
More information about the latex3-commits
mailing list.