Measuer execution time.
Bollowed from https://qiita.com/kazuhirokomoda/items/1e9b7ebcacf264b2d814
timer.
timer
Measure execution time, contextmanager version.
name – identifier of measurement period.
Examples:
>>> from timer import timer >>> with timer('process train'): ... hogehoge()