good idea to create a decorator to calculate the execution time, probably you can put this method inside the algorithm class and use it for all your algorithms