Interval of updating location with Fused provider - android-location

I am facing with one problem. I am using Fused Location Provider and in docs it writes that when we use high priority, we will get updates on every 5 seconds, but I have watched some tutorial and that guy wrote this function
protected void createLocationRequest(){
mLocationRequest=new LocationRequest();
mLocationRequest.setInterval(INTERVAL);
mLocationRequest.setFastestInterval(FASTEST_INTERVAL);
mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
}
This INTERVAL is 10 seconds. Is that mean that I will get updates on every 10 seconds or on 5 seconds(like it writes in docs for using high priority)?
Thanks in advance.

Interval 10 seconds : You will receive location updates approximately at each 10 seconds. But it's approximate, it may give location less or more than 10 seconds.
fastest interval : This value must be lower than interval value. Okay we know that location updates will come us around 10 seconds(more or less). fastest means here, i dont wanna receive location updates lower than this value(fastest interval)
Assume that you have below parameters
Interval : 10 seconds
Fastest Interval : 5 seconds
And possible result could be like below (assumption)
01:00:00 (Requested)
01:00:12 (location update, 12 seconds)
01:00:22 (location update, 10 seconds)
01:00:30 (location update, 8 seconds)
01:00:38 (location update, 8 seconds)
01:00:46 (location update, 8 seconds)
01:00:52 (location update, 6 seconds)
01:00:59 (location update, 7 seconds)
...
Result : You received location updates about 10 seconds and more than 5 seconds

Related

Gatling - constant user for 1 minute and my script need to run for 30 minutes

I'm very new to gatling
my scope is i need to test few API's with constant hit by user in every 1 minute and this should be repeated for 30 minutes or 1hr or 24hrs
Every 1 minute 3 user need to hit my API
30 sec pause after 1 minute
Again we need to hit the API for 1 minute with 3 user.
This should be repeated for 30 minutes.
I have tried below.
val AllAPI = scenario("Registration API - Add").during(30 minutes) {
feed(csvFeeder1)
.feed(csvFeeder2)
.exec(http("Registration API - Add")
....}
setUp(PVHAPI.inject(constantConcurrentUsers(3).during(1 minutes))).protocols(httpProtocol)
setUp(PVHAPI.inject(constantConcurrentUsers(3).during(1 minutes))).protocols(httpProtocol).pauses(normalPausesWithStdDevDuration(5))
The above configuration will take pause set up on request level as a mean value and use std deviation 5s to choose the final pause value.

How to set up nested IFS in google sheets when working with DURATION

I have been asked to set up a Google Sheet for a billing department with the following requirements
Inputs
Start Time
End Time
These will be formatted using TIME
The Request is to take the duration output (End Time-Start Time) and make"Billable Time" by automatically appling these rules
If Duration is less than 60 minutes, then set Billable Time to 60 minutes
If Duration is more than 60 minutes, but less than 90 minutes, then set Billable Time to 90 minutes
If Duration is more than 90 minutes, then set Billable Time to the nearest quarter hour (15 minutes) rounding up.
My Current Formula is: =IF(AND(TIME(1,0,0)>=(C2-B2),TIME(1,0,0),IF(AND(TIME(1,30,0)>=(C2-B2),TIME(1,30,0),IF(AND(TIME(1,30,0)>(C2-B2),CEILING(C2-B2,TIME(0,15,0))))))))
Where B2 is the Start Time and C2 is the End Time
But I get the error
Error
Wrong number of arguments to IF. Expected between 2 and 3 arguments, but got 1 arguments.
I've had some success with this formula but I can't seem to get the time values to work
=IFS(value(C2-B2)=0," ",value(C2-B2)<=60,"60",value(C2-B2)<=90,"90",value(C2-B2)>90,ceiling(C2-B2,"00:15"))
=IF(C2-B2<=0.04166666667, 0.04166666667,
IF(C2-B2<=0.0625, 0.0625,
IF(C2-B2>0.0625, CEILING(C2-B2, 0.01041666667))))
note: all 3 cells formatted as TIME
_______________________________________________________________
=IF(C2-B2<=0.04166666667, TEXT(0.04166666667, "hh:mm"),
IF(C2-B2<=0.0625, TEXT(0.0625, "hh:mm"),
IF(C2-B2>0.0625, TEXT(CEILING(C2-B2, 0.01041666667), "hh:mm"))))
note: all 3 cells formatted as AUTOMATIC

Can I apply factor when running load tests jmeter

I have the following scenario:
every 1/2 hour a user send a file to the server
every 5 seconds a user pings the server
do it for 4000 users during 24 hours
my question is, can i do the following and achieve the same results?
every 15 minutes a user send a file to the server
every 2.5 seconds a user pings the server
do it for 2000 users during 24 hours
thanks.
Add Thread Group to your Test Plan and configure it to have 4000 virtual users, loop forever and run for 84600 seconds (24 hours * 60 minutes per hour * 60 seconds per minute)
Add a HTTP Request to ping the server
Add Constant Throughput Timer as a child of the HTTP Request sampler and configure it to fire 12 times per minute (60 seconds in minute / 5 seconds)
Amend Calculalte throughput based on dropdown value according to your test scenario (whether each user or any user should ping the server each 5 seconds)
Apply the similar configuration for remaining use cases.

Jmeter - I have run 2 test cases but result seems odd

I have run load testing for website but when I have increased no. of users , I can see throughput time seems increasing instead of decrease.
Test Case 1 :
No. of Threads : 15
Ramp up time : 450 [As I want to put delay of 30 seconds between 2 users]
Loop count : Forever
Scheduler : 1800 Seconds [As I want to run test for 30 minutes]
In Http requests I have added 10 pages and each request has constant timer with 30000 miliseconds as I need to put delay of 30 seconds between 2 requests.
Now When I see result of Aggregate Report , it shows me Throughput 3/min for each request.
Test Case 2 :
No. of Threads : 30
Ramp up time : 900 [As I want to put delay of 30 seconds between 2 users]
Loop count : Forever
Scheduler : 1800 Seconds [As I want to run test for 30 minutes]
In Http requests I have added 10 requests/pages and each request has constant timer with 30000 miliseconds as I need to put delay of 30 seconds between 2 requests.
Now When I see result of Aggregate Report , it shows me Throughput 6/min for each request.
I am confuse that how it is possible? If my users are increased from 15 to 30 then it should have more load on server and throughtput should decrease like 1/min or 2/min.
Please let me know what I am doing wrong here.
Throughput is no. of completions per unit time. (A completion can be a http request/db request in short anything that needs to be executed and needs >0 execution time.)
Ex. req per sec or req per min etc.
By definition of throughput in JMeter, it is calculated as total no. of requests/total time.
In your first case, no. of requests generated in 1800 seconds with 3 second delay in every request by 15 users are x. Thus throughput is x/30 i.e. 3 it means ~90 requests were generated (verify this from aggregate report or other reporter.)
In your second case, everything else is same but no. of users are doubled which creates ~double no. of requests in given time which is (1800 seconds)
Thus according to formula, no. of requests generated/total time.
Throughput in 2nd case = 2x/30 = 2*throughput in 1st case
Which is 6/min. (Correctly shown by JMeter.)
Key here is to check no. of requests generated in both cases.
I hope this clears your confusion. Let me know if you need further clarification. BTW "when I have increased no. of users , I can see throughput time seems increasing instead of decrease." is not always true.
Throughput increased by factor of 2.
Test Case 1: - 3 requests per minute - 1 request each 20 seconds
Test Case 2: - 6 requests per minute - 1 request each 10 seconds
As per JMeter Glossary:
Throughput is calculated as requests/unit of time. The time is calculated from the start of the first sample to the end of the last sample. This includes any intervals between samples, as it is supposed to represent the load on the server.
The formula is: Throughput = (number of requests) / (total time).
You may also be interested in the following plugins:
Server Hits Per Second
Transactions Per Second
or alternatively Loadosophia.org service which can convert your JMeter .jtl results files into easy-understandable professional load report

Magento 1.7 - Cron.php: too late for the schedule

I created some modules to be executed by magento cron but i get always the error.
The numbers:
Cron.php gets executed every 5 minutes
system/cron/schedule_generate_every = 15
system/cron/schedule_ahead_for = 30
system/cron/schedule_lifetime = 15
The module cronjobs should be executed every 5 minutes.
They are added correct to cron_schedule to be executed i.e. at 2014-01-16 16:40:00, 2014-01-16 16:45:00, 2014-01-16 16:50:00 ...
But on execution in 16:50 i get lots of errors. exception 'Mage_Core_Exception' with message 'Too late for the schedule.' also for jobs in the future.
Perhaps: our local time is 17:50, server time 16:50. But i can't remember we had this issue before on other cronjobs.
If the cronjob runs every 5 minutes, try this configuration:
Generate Schedules Every 5
(enter here the cronjob execution time, in this case 5 minutes)
Schedule Ahead for 125
(based on cronjob execution time plus the maximum time one job needs. For example: sitemap generation takes 120 minutes, then enter 120 minutes + 5 = 125 minutes)
Missed if Not Run Within 180
(runtime of the longest process, for example: an import takes 120 minutes, then enter 120 minutes + 60 minutes - because sometimes there is a difference between mysql and server time)
History Cleanup Every 10
(minimum cronjob execution time = 5 * 2 = 10 minutes in this case)
Success History Lifetime 1440
(duration of cronjob storage, to proof if everything works fine. 1440 = 24 hours)
Failure History Lifetime 1440
(duration of cronjob storage, to proof if there is an error. 1440 = 24 hours)
And last but not least, install AOE-Scheduler for a visual inspection of your cronjobs.
http://www.magentocommerce.com/magento-connect/aoe-scheduler.html

Resources