Hi.
The referee for a paper I've submitted has asked us to provide some brief remarks on both the time *and space* taken for the various examples we provide for our code. A lot of people talk about benchmarking time, so I'm not really asking about that here (though if you think using default_timer from the timeit module is a bad idea, feel free to speak up!). Rather, I have no idea how to properly report how much space was used in a computation. What I've come across is:
resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
It seems like running this at the end of the computation (with a clean boot of sage to begin with) might make sense, but I just don't know. Is there a standard way to do such a benchmark? The code we are using is written as new modules and so is fully incorporated in the copy of sage we are running (in case that matters).
Thanks,
Rob