diff options
| author | nagachika <nagachika@ruby-lang.org> | 2024-08-31 18:51:41 +0900 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2024-08-31 18:51:41 +0900 |
| commit | f095a085a43b609be6282fcc27ab7fe859259dfc (patch) | |
| tree | 6bf2ecd7042618fdf1db8447a3afc7d348128f11 | |
| parent | f4847607ee52040fc62531f37001ea1a22acd856 (diff) | |
merge revision(s) 8a7e6f6852740e989ef8f679db5631306466a4ed:
Improve base time of assert_linear_performance (#11369)
Remove `.ceil` from base time calculation that makes 10x gap.
This will make the assertion more strict and also less flaky.
| -rw-r--r-- | tool/lib/core_assertions.rb | 4 | ||||
| -rw-r--r-- | version.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb index 2c8bc7f359..6b67da8334 100644 --- a/tool/lib/core_assertions.rb +++ b/tool/lib/core_assertions.rb @@ -778,7 +778,9 @@ eom end times.compact! tmin, tmax = times.minmax - tbase = 10 ** Math.log10(tmax * ([(tmax / tmin), 2].max ** 2)).ceil + + # safe_factor * tmax * rehearsal_time_variance_factor(equals to 1 when variance is small) + tbase = 10 * tmax * [(tmax / tmin) ** 2 / 4, 1].max info = "(tmin: #{tmin}, tmax: #{tmax}, tbase: #{tbase})" seq.each do |i| @@ -11,7 +11,7 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 5 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 220 +#define RUBY_PATCHLEVEL 221 #include "ruby/version.h" #include "ruby/internal/abi.h" |
