Skip to content

Commit

Permalink
Update docs with example for proper handling of file-based rules
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick96 committed Feb 14, 2024
1 parent c6d4e75 commit c159722
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sdk/mx.sdk/mx_sdk_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@ class NativeImageBenchmarkMixin(object):
happily read that file and produce performance data in every stage (even the ``image`` stages).
Such rules need to be modified to only trigger in the desired stages. Either by parsing the file location out of the
benchmark output or by writing some Native Image specific logic (with :meth:`is_native_mode`)
An example for such a workaround are :class:`mx_benchmark.JMHBenchmarkSuiteBase` and its subclasses (see
``get_jmh_result_file``, its usages and its Native Image specific implementation in
:class:`mx_java_benchmark.JMHNativeImageBenchmarkMixin`)
If the benchmark suite itself dispatches into the VM multiple times (in addition to the mixin doing it once per
stage), care must be taken in which order this happens.
Expand Down

0 comments on commit c159722

Please sign in to comment.