sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #02231
Re: [Question #152648]: Is there any way to measure performance with Sikuli?
Question #152648 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/152648
Status: Open => Answered
RaiMan proposed the following answer:
currently not available neither on the Python nor on the Java level
(only exception: findAll seems to report time used - seems to be for
some debugging purposes).
I use time.time() if I need some timing information (module time already
imported by Sikuli init)
principally:
s = time.time()
find(<some image>)
print time.time()-s
If you need it more often, you have to decide to either complement the
Python class Region or make a wrapper function:
def myFind(pattern, reg=None):
s = time.time()
if reg:
m = reg.find(pattern)
else:
m = find(pattern)
print "[timing]", m, "time taken:", time.time()-s
usage:
click(myFind(<some image>)) # searches on screen
or:
click(myFind(Pattern(<some image>).targetOffset(50,10), Region(App("some app").window())) # restrict search to app window 0
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.