In the following post Sleep a random time in with iMacros, works on FireFox/Chrome plugin
it describes how to add RANDOM time to replays.
My question: Is there a way to add a SPECIFIC amount of time to each replay either via the macro file or batch file.... such as it plays the first time at say 6pm, then the second time it plays same time the next day PLUS 2 minutes (so 6:02pm) then the third day another 2 minutes added (6:04pm) ??
Im running the macro from a batch file, so I could put it in there if there is a way.... ?? any ideas?
Yes.
But for this you need JavaScript scripting and a use of Date() objest in JS. Also look at this.
How do I get the current time only in JavaScript
Related
I need to show three timers, something like this:
'https://codepen.io/kaicarver/pen/pyaKVR' or 'https://jsfiddle.net/7bk5mw9y' of whatever as long as it shows three timers, (preferably with a start all button)
the three contesters need to stop their time, so far all possible with both scripts.
After the last one presses stop the page should show a message below the scores.
I am searching and coding for days now without luck.
I am way to beginner to achieve this. Is there anyone here who knows an existing script that does this of maybe have a simple solution?
I am using RRDTool to graph Data and a predicted Trend (LSL) in one Graph.
Therefore I am adjusting the corresponding template.
At the moment I set my end time like this:
--end start+7d
When looking at the resulting graphs via the website I can select different time ranges on the right side:
Custom time Range, Overview, 4 Hours, 25 Hours, One Week, One Month and One Year
What I want:
If I select a time range of 4 Hours, 7 days of forecasting makes no sense. I want to calculate the end time dependent on the time range selected. For example I want the time period displayed in the future being exact of the same size as the time range selected.
Basically I want to define my ending time like this:
--end start+(end-start)
This is not possible, because the end time can not be defined by itself.
Is there a way to extract the selected time-range before defining the end by hand? I could calculate start+(end-start) in my PHP Template and insert it when defining the ending time.
Every help appreciated.
EDIT: I forgot to mention, that I am using RRDTool via PNP4Nagios. When speaking of a website I meant the PNP4Nagios Standard Web Appearance. This is shipped by default when installing PNP4Nagios via Packages.
With PNP4Nagios, your custom template can be used to define all the graph definition -- with the exception of the time window, which is added to the parameter lists in $opt[] and $def[]. So, you cannot easily override the time window 'end' as it is already defined as 'now' by PNP4Nagios (and the 'start' is already defined relative to the end, based on the time range you selected in the web interface). In fact, RRDTool is fairly robust, so if it sees a start/end being redefined the last such definition usually takes precedence... but this doesn't solve your issue.
I think what you're trying to do is have the 1day graph (which normally starts at 'end-1day' and ends at 'now') to go from 'now-1day' to 'now+1day' so that your prediction line could fill the second part. This would need to be done by editing the PNP4Nagios code, which is a bit out of scope of this answer.
PNP4Nagios allows definition of the standard timeranges in the config.php; you can also define new timeranges when you call the graph. This means you can achieve the required time window like this:
pnp4nagios/graph?host=<hostname>&srv=<servicedesc>&start=-1day&end=+1day
... although this is just a one-off and does not override the defaults.
The current view config in PNP4Nagios does not allow the default views to specify an end offset, only a start offset.
Apologies if this request is similar to others - I am new to JMeter and have searched for other relevants posts but couldn't find anything - or maybe I just didn't understand them!
I'm performance testing a system with a web based application. The front end system will be processing records submitted into the system via MQ - the front end allows the user to pick up a record from the queue, validate some detail, make changes and submit the changes.
There will be 20 users using the front end to do this message validation, update and submission.
Each user is expected to need 30 seconds to pick a message from queue, make changes and resubmit - so we are expecting 1 user to process 120 records/hour, so 20 users will be expected to process 2400 records/hour
The picking up the record off the queue, changing it and submitting the changes will be done via 3 individual web pages.
SO - think time across the 3 pages has been defined as 24 seconds (leaving 6 of the 30 second limit for rendering, server responses, db calls etc.)
However I don't know how to specify this within JMeter. From my reading I can see that I can add a Timer in as a parent to a sampler and I assume I can add a Timer in as a parent of the Recording Controller? - but I need to be able to specify that the 24 second think time is spread across those 3 different pages.
I read a post elsewhere suggesting that if I record using the proxy after adding the Gaussian Random Timer in as a child of the Test Plan (parent to everything else) then the http proxy will record the think time as a ${T} variable in the Gaussian Random Timer - I tried this and this didn't work (also I don't want to rely on this - I'd like to be able to understand and make changes to think time properly rather than relying on JMETER to do it for me.)
To reiterate - 20 users, 30 seconds for 1 user to complete a transaction, TT defined as 24 seconds - I am struggling what Timer to use, where to put it so that the think-time is spread across the samplers that equate to the GETS associated with the 3 pages the user will navigate through.
Apologies for the lengthy post - I just wanted to be clear and concise.
Many thanks in advance,
As per JMeter Timers documentation
Note that timers are processed before each sampler in the scope in which they are found; if there are several timers in the same scope, all the timers will be processed before each sampler.
Timers are only processed in conjunction with a sampler. A timer which is not in the same scope as a sampler will not be processed at all.
To apply a timer to a single sampler, add the timer as a child element of the sampler. The timer will be applied before the sampler is executed. To apply a timer after a sampler, either add it to the next sampler, or add it as the child of a Test Action Sampler.
Now regarding "what timer to use"
There are 2 scenarios:
Virtual-User-oriented scenario - when you try to simulate N users working together
Goal-Oriented-scenario - when you try to produce N hits per second load.
In case of scenario 1 even Constant Timer can be quite enough, besides it will provide repeatability of results. See above quote for information on where to put your timer(s)
In case of scenario 2 you'll need Constant Throughput Timer. If 20 users process 2400 records per hour and each record assumes 3 web page calls, it means that 7200 requests will be made in one hour which in its turn stands for 120 requests per minute (this is what you should enter into the timer's "throughput" area) or 2 requests per second.
I have both a 20 second audio file and a 60 second video file. I only want to include these once, but need different start/end times for them in various <MediaElement>s.
For example, on my page one I need the seconds 2-13 of the audio file and on page two I need the first 10 seconds (0-9). On page three I need seconds 12-18. I'd really prefer not to have 3 different audio files, just a set of start/end values for the portion of audio/video file.
I see .Position for a start time, but what about an end time that doesn't have to hook an event to stop itself? Also, I'm not sure what the XAML for .Position would look like as there is no sample of that on MSDN.
Any thoughts?
Found a great way to do this on this thread: Silverlight: Expose audio with specific start and stop times
ok guys a question, can this be done or has it already been done, or can someone point me in the right direction (be aware i an a total newbie with action script)
i have a main swf movie about 600px x 400 px
what i want is this to run for say 30 seconds, then i want a countdown timer in the bottom corner for say 10 seconds, after this i want it to randomly load another swf file over the top of the original, and then the timer repeats for 10 seconds and repates the random loading of another swf file over the top etc, etc, etc
so whats the best way around this
It's possible. If you're comfortable with the basic syntax and grammar of AS3, then after adding the following topics to your toolbox, you should be ready.
1) Timers
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/utils/Timer.html
2) Loaders
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/Loader.html
3) Math.random()
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Math.html
In summary what I'd suggest would be to:
set up a Timer which fires every N seconds
when it fires, use a Loader to start loading a file whose file-name has been either generated or retrieved using a random number