sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #36669
[Bug 1540233] Re: Region.setObserveScanRate(float observeScanRate) without any function
** Description changed:
public class SikuliTest {
- public static void main(String[] args) {
- try {
- Region searchRegion = new Screen();
- searchRegion.setObserveScanRate(0.1f);
+ public static void main(String[] args) {
+ try {
+ Region searchRegion = new Screen();
+ searchRegion.setObserveScanRate(0.1f);
- Long startingTime = System.currentTimeMillis();
- Match match = searchRegion.wait("cancel_button.png",
- Constants.FOREVER);
- match.click();
- System.out.println("Thread1: "
- + (System.currentTimeMillis() - startingTime) + "ms");
+ Long startingTime = System.currentTimeMillis();
+ Match match = searchRegion.wait("cancel_button.png",
+ Constants.FOREVER);
+ match.click();
+ System.out.println("Thread1: "
+ + (System.currentTimeMillis() - startingTime) + "ms");
- } catch (FindFailed e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
+ } catch (FindFailed e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
}
If I bring the desired target to the screen after the program started I
get always a similar reaction time.
[log] CLICK on L(280,194)@S(0)[0,0 2560x1440]
Thread1: 4157ms
With 0.1f I would have expected that Sikulix searches every 10 seconds
- with a lower CPU usage, but it is always the same. When setting the
- observe scan rate via the global settings, it behaves as expected.
+ with a lower CPU usage, but it is always the same. It has also no effect
+ if I set the observe scan rate via the global settings. Only
+ Settings.waitScanRate behaves as expected.
** Description changed:
public class SikuliTest {
public static void main(String[] args) {
try {
Region searchRegion = new Screen();
searchRegion.setObserveScanRate(0.1f);
Long startingTime = System.currentTimeMillis();
Match match = searchRegion.wait("cancel_button.png",
Constants.FOREVER);
match.click();
System.out.println("Thread1: "
+ (System.currentTimeMillis() - startingTime) + "ms");
} catch (FindFailed e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
If I bring the desired target to the screen after the program started I
get always a similar reaction time.
[log] CLICK on L(280,194)@S(0)[0,0 2560x1440]
Thread1: 4157ms
With 0.1f I would have expected that Sikulix searches every 10 seconds
with a lower CPU usage, but it is always the same. It has also no effect
if I set the observe scan rate via the global settings. Only
- Settings.waitScanRate behaves as expected.
+ Settings.WaitScanRate behaves as expected.
** Summary changed:
- Region.setObserveScanRate(float observeScanRate) without any function
+ ObserveScanRate without any function
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1540233
Title:
[1.1.0] ObserveScanRate vs. WaitScanRate
Status in Sikuli:
New
Bug description:
Hi,
as far as I understood from the documentation the properties
WaitScanRate and ObserveScanRate should be the same function. But
ObserveScanRate does not change anything in my case but WaitScanRate
behaves as expected. Even worse is that only the ObserveScanRate can
be set for a region.
Here is my test.
public class SikuliTest {
public static void main(String[] args) {
try {
// Settings.WaitScanRate = 0.1f; // Does work
// Settings.ObserveScanRate = 0.1f; /Does not work
Region searchRegion = new Screen();
searchRegion.setObserveScanRate(0.1f); // Does not work
Long startingTime = System.currentTimeMillis();
Match match = searchRegion.wait("cancel_button.png",
Constants.FOREVER);
match.click();
System.out.println("Thread1: "
+ (System.currentTimeMillis() - startingTime) + "ms");
} catch (FindFailed e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
If I bring the desired target to the screen after the program started
I get always a similar reaction time.
[log] CLICK on L(280,194)@S(0)[0,0 2560x1440]
Thread1: 4157ms
With 0.1f I would have expected that Sikulix searches every 10
seconds with a lower CPU usage, but it is always the same. It has also
no effect if I set the observe scan rate via the global settings. Only
Settings.WaitScanRate behaves as expected.
Edited on 03-02-2016, when I realized the difference between
WaitScanRate and ObserveScanRate.
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1540233/+subscriptions
References