And then aggregating and printing the results in synthesis:
def synthesis(slices):
stats = pstats.Stats()
for i in range(slices):
stats.add(f"profile-{options.new_col}.{i}")
stats.sort_stats('cumulative')
#stats.print_stats()
stats.print_callers()
I believe being able to do this out-of-the-box from urd.build would be an extraordinary feature. We would certainly need to expose some way to print the statistics in the urd.build, for which I'd need some input. Otherwise I'd be quite happy to work on this implementation if deemed reasonable
We've been using cProfile from python quite successfully. And the changes required for a method to be profiled have been mostly minimal.
The can be summarized in:
I managed to execute this in a custom way by renaming analysis and/or synthesis to
run_analysis
andrun_synthesis
. e.g:Introducing the profiling analysis as this:
And then aggregating and printing the results in synthesis:
I believe being able to do this out-of-the-box from
urd.build
would be an extraordinary feature. We would certainly need to expose some way to print the statistics in theurd.build
, for which I'd need some input. Otherwise I'd be quite happy to work on this implementation if deemed reasonable