Skip to content

Profiler: Minor refactor ScheduleGettable (QAE-304)

Explanation of changes

Added a subclass ProfiledGettable to the ScheduleGettable in order to profile execution times of different stages of schedule execution. The compile step within the ScheduleGettable.initialize has been isolated to time the compilation step and to reduce duplicate code.

By replacing the ScheduleGettable by ProfiledGettable, the timing data is stored and can be logged by either the log_profiles method to store a JSON or by plot_profile to generate a graphic representation of the profiling data.

Motivation of changes

Timing performance is becoming a more prevalent issue. By adding this feature, we can more concretely identify performance issues.


Merge checklist

See also merge request guidelines

  • Merge request has been reviewed and approved by a project maintainer.
  • Merge request contains a clear description of the proposed changes and the issue it addresses.
  • Merge request made onto appropriate branch (main for most MRs).
  • New code is fully tested.
  • New code is documented and docstrings use numpydoc format.
  • CHANGELOG.rst and AUTHORS.rst have been updated (when applicable).
  • CI pipelines pass
    • pre-commit run --all-files --hook-stage commit passes (gitlab-ci),
    • test suite passes (gitlab-ci),
    • no degradation in code-coverage (codacy),
    • no (serious) new pylint code quality issues introduced (codacy),
    • documentation builds successfully (CI and readthedocs),
    • windows tests pass (manually triggered by maintainers before merging).

Edited by Edgar Reehuis

Merge request reports

Loading