jemalloc/test
Dmitry Ilvokhin 46690c9ec0 Fix test_retained on boxes with a lot of CPUs
We are trying to create `ncpus * 2` threads for this test and place them
into `VARIABLE_ARRAY`, but `VARIABLE_ARRAY` can not be more than
`VARIABLE_ARRAY_SIZE_MAX` bytes. When there are a lot of threads on the
box test always fails.

```
$ nproc
176

$ make -j`nproc` tests_unit && ./test/unit/retained
<jemalloc>: ../test/unit/retained.c:123: Failed assertion:
"sizeof(thd_t) * (nthreads) <= VARIABLE_ARRAY_SIZE_MAX"
Aborted (core dumped)
```

There is no need for high concurrency for this test as we are only
checking stats there and it's behaviour is quite stable regarding number
of allocating threads.

Limited number of threads to 16 to save compute resources (on CI for
example) and reduce tests running time.

Before the change (`nproc` is 80 on this box).

```
$ make -j`nproc` tests_unit && time ./test/unit/retained
<...>
real    0m0.372s
user    0m14.236s
sys     0m12.338s
```

After the change (same box).

```
$ make -j`nproc` tests_unit && time ./test/unit/retained
<...>
real    0m0.018s
user    0m0.108s
sys     0m0.068s
```
2024-12-02 14:12:26 -08:00
..
analyze Tcache batching: Plumbing 2024-05-22 10:30:31 -07:00
include/test Add batching to arena bins. 2024-05-22 10:30:31 -07:00
integration Make headers self-contained by fixing #includes 2023-07-14 09:06:32 -07:00
src Enable a few additional warnings for CI and fix the issues they uncovered 2023-08-11 13:56:23 -07:00
stress increase the ncached_max in fill_flush test case to 1024 2024-08-06 13:16:09 -07:00
unit Fix test_retained on boxes with a lot of CPUs 2024-12-02 14:12:26 -08:00
test.sh.in Print test error messages in color when stderr is a terminal 2023-07-13 13:03:23 -07:00