Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Old/profilertest.py
blob: 3df262becf6e078709a9fd57119d023d00efe327 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/python

import time

from Framework.Core.Profiler import TaskProfiler

TP = TaskProfiler()


for j in range(1,10):
    t1 = time.time()
    TP.ProfileBegin( "test" )
    print time.time() - t1
    for i in range(1,100000):i=i
    t1 = time.time()
    TP.ProfileEnd( "test" )
    print time.time() - t1

TP.ProfileBegin( "alah" )
for i in range(1,100000):j=i
TP.ProfileEnd("alah")
TP.ProfileBegin( "blah" )
for i in range(1,100000):j=i
TP.ProfileEnd("blah")

print TP.ProfilePrint( "test" )

print TP.PrintAll()