Profiling code
svn: r486
This commit is contained in:
parent
948b579cc1
commit
789425b14f
@ -232,16 +232,12 @@ def loadRevision(database, file, filename, revision, callback=None):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import profile
|
import profile
|
||||||
import cPickle
|
|
||||||
|
|
||||||
database = RelDataBase()
|
database = RelDataBase()
|
||||||
t1 = time.time()
|
t1 = time.time()
|
||||||
#profile.run('loadData(database, sys.argv[1])')
|
if len(sys.argv) > 2:
|
||||||
loadData(database,sys.argv[1])
|
profile.run('loadData(database, sys.argv[1])')
|
||||||
|
else:
|
||||||
|
loadData(database,sys.argv[1])
|
||||||
t2 = time.time()
|
t2 = time.time()
|
||||||
print t2-t1
|
print t2-t1
|
||||||
f = gzip.open("autosave","w")
|
|
||||||
p = cPickle.dump(database,f)
|
|
||||||
f.close()
|
|
||||||
t3 = time.time()
|
|
||||||
print t3-t2
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user