Ad

Sunday, October 8, 2017

Time your python script


  • Time it in the terminal
time file_name.py
  • Time it in your script

import time
start = time.time()

fun()

print 'It took', time.time()-start, 'seconds.'

Source:StackOverflow - https://stackoverflow.com/questions/6786990/find-out-time-it-took-for-a-python-script-to-complete-execution

No comments:

Post a Comment

React UI, UI UX, Reactstrap React Bootstrap

React UI MATERIAL  Install yarn add @material-ui/icons Reactstrap FORMS. Controlled Forms. Uncontrolled Forms.  Columns, grid