A common situation when profiling is that a piece of code has a high first-call cost (e.g. the first call will do some expensive initialization), but future calls to the piece of code will be fast because they can reuse that initialization. It'd be awesome if there were a way to pass an argument to LineProfiler to skip the first run of a given function for the purposes of the statistics. E.g. syntax like this:
A common situation when profiling is that a piece of code has a high first-call cost (e.g. the first call will do some expensive initialization), but future calls to the piece of code will be fast because they can reuse that initialization. It'd be awesome if there were a way to pass an argument to
LineProfiler
to skip the first run of a given function for the purposes of the statistics. E.g. syntax like this: