Is your feature request related to a problem?
As part of parallelizing benchmarking work (https://github.com/MDAnalysis/parallelization-benchmarks), we would like to implement a code-level timing/performance framework.
Describe the solution you'd like
- Use
time.perf_counter to track the time spent in each component of an analysis. The performance report should be parallel-aware, so that time spent in individual computational groups can be extracted and analyzed.
- Add an
enable_timing flag to AnalysisBase.run() so that performance data can be accessed, for example via AnalysisBase.performance.
Describe alternatives you've considered
- Using external tools, such as
line_profiler.
Additional context
Is your feature request related to a problem?
As part of parallelizing benchmarking work (https://github.com/MDAnalysis/parallelization-benchmarks), we would like to implement a code-level timing/performance framework.
Describe the solution you'd like
time.perf_counterto track the time spent in each component of an analysis. The performance report should be parallel-aware, so that time spent in individual computational groups can be extracted and analyzed.enable_timingflag toAnalysisBase.run()so that performance data can be accessed, for example viaAnalysisBase.performance.Describe alternatives you've considered
line_profiler.Additional context
timeit-style implementation in PMDA (https://github.com/MDAnalysis/pmda/blob/master/pmda/parallel.py) that could serve as inspiration.