How to get time (milisecond) of a python IO execution

This is the place for queries that don't fit in any of the other categories.

How to get time (milisecond) of a python IO execution

Postby tbaror » Sat Sep 14, 2013 9:33 pm

Hi All

i am trying to test measure some IO execution in milliseconds , but bit confuse about best method achive that under windows 7
i am using following code but not sure if its best or correct way since i have two different results, which one should i take as results
and which is best way
please advice

100000000 loops, best of 3: 0.00925 usec per loop

Code: Select all
import timeit ,time
import datetime
import os

def main():

if __name__ == '__main__':

    t = timeit.Timer('main()')

    print (t.timeit(1))
Posts: 19
Joined: Sun Jul 07, 2013 8:06 pm

Return to General Coding Help

Who is online

Users browsing this forum: No registered users and 9 guests