4
I’m making a script where I measure the performance of a query in a database. The code is as follows::
start = datetime.datetime.now()
//CONSULTA AQUI
end = datetime.datetime.now()
print "Time taken: %s"%(end - start, )
The program returned the following result in the first query: Time Taken: 0:00:00.000593 In another query presented the following result: Time Taken: 0:00:31.833141
The two results are being given in milliseconds or seconds?
Related (or duplicated?): Measuring the run time of a function
– Jéf Bueno
didn’t understand the question @jbueno
– Jessica Costa
The first consultation took less than 1 thousandth of a second, the second took 31 seconds and a few thousandths. After the point are the thousandths.
– Paulo
Thank you, guys!
– Jessica Costa