Commit graph

6 commits

Author SHA1 Message Date
Tony Chen
5357110556 Fix error behaviour in mini-benchmark
In commit f5ca4077, an the "--log" option was added but it was implemented by
invoking a sub-shell. Any errors in the sub-shell would not be propagated and
thus cause mini-benchmark to suppress errors.

The fix here is to propagate the exit status of the sub-shell.

All new code of the whole pull request, including one or several files that are
either new files or modified ones, are contributed under the BSD-new license. I
am contributing on behalf of my employer Amazon Web Services, Inc.
2024-04-06 18:18:10 -07:00
Tony Chen
2b0e0730c7 Add cpu-limit option for mini-benchmark
As performance improves, the permitted number of CPU cycles to be used
during the benchmark should be lowered to catch performance regressions. An
option is added to better support this.

All new code of the whole pull request, including one or several files that are
either new files or modified ones, are contributed under the BSD-new license. I
am contributing on behalf of my employer Amazon Web Services, Inc.
2024-04-06 18:18:10 -07:00
Robin Newhouse
6efa75a8cb Enable mini-benchmark to run with perf
The mini-benchmark.sh script failed to run in the latest Fedora
distributions in GitLab CI. Executing the benchmark inside a Docker
container had failed because the check for `perf` was done in a way that
caused the benchmark to exit because of the `set -e` option. Test and
skip `perf` to allowing the remaining benchmark activities to proceed.

This check was added in acb6684 but inadvertantly reverted in 42a1f94.

Logic was corrected to only run perf when the flag is enabled, and to
prevent perf stat and perf record from being simultaneously enabled.

Set -ex is also added to enable easier identification of mini-benchmark
issues in the future.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
2024-03-27 22:40:33 -07:00
Dishon Merkhai
f5ca4077d8 MDEV-30839: Add new options to mini-benchmark and fixes
Add new options to mini-benchmark.sh so it is more useful, such as
`--log` to avoid output from `lscpu` and other commands being lost.

Also fix following errors:

- Fix if condition for the cycle count regression verdict. The condition
  checked if the cycle count was greater than 850 billion, but `$RESULT`
  is only 3 digits and represents the number of cycles in billions.

- Fix flamegraph width. The original width caused the flamegraph to be
  cut-off on most screen sizes in the browser.

- Fix ShellCheck warnings and suggestions.

- Fix condition to check if perf has permission to run on the system.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
2024-01-30 12:26:09 +11:00
Robin Newhouse
20d2c9038a Fix mini-benchmark
The mini-benchmark.sh script failed to run in the latest Fedora
distributions in GitLab CI. It requires `lscpu` resolved by installing
util-linux.

Additionally, executing the benchmark inside a Docker container had
failed because of increased Docker security in recent updates. In
particular the `renice` and `taskset` operations are not permitted.
Neither are the required `perf` operations.
https://docs.docker.com/engine/security/seccomp/

Allow these operations to fail gracefully, and test then skip `perf`,
allowing the remaining benchmark activities to proceed.

Other minor changes to the CI are included such as allowing sanitizer
jobs to fail and using "needs" in the mini-benchmark pipeline.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer
Amazon Web Services, Inc.
2023-03-08 13:26:45 +00:00
Otto Kekäläinen
c5c61b51b6 Extend the Gitlab-CI pipeline to run mini benchmark
Implement new mini-benchmark script for simple CPU bound benchmark for the
duration of 5 minutes. The script can be run stand-alone or as part of a
CI pipeline.

Extend Gitlab-CI to run mini-benchmark on every commit to catch if there
are severe performance regressions.

Also bump MARIADB_MAJOR_VERSION to 10.8 which is needed on the 10.8 branch.
2022-01-22 13:47:39 -08:00