I want to send telemetry data of my BusinessWorks 6 flow to Azure's Application Insights. They provide a java library that is easy enough to use but it requires me to fill in certain data by myself.
Specifically I need to enter the duration of the request. While this should be easy enough to calculate I can't figure out where I can find the timestamp of the initiation of the process or any other timestamps for that matter.
My current approach is to assign the current timestamp to a variable in the start of the flow. Then at the end I use that value to calculate the duration. While it does work it results in duration times much lower then what Postman produces for instance.
Does anyone know of a simpler way I can determine the duration of a request?
So far i understood you want to track the duration of a request served by a businessworks process.
Afaik no easy way to find that as a variable inside the process context.
If you only like to track performance of your processes with application insights and don't need any correlation of the data processed, the process execution statistics might be thing to take a look:
https://docs.tibco.com/pub/activematrix_businessworks/6.4.1/doc/html/GUID-B07A14A8-83DF-43E4-B73D-F942103FAA1E.html
Related
In Jmeter I have a scenario like
Load tested with 4000 users and 1 hour duration
759965 requests made and out of which one request failed on an average 18894.13 requests made per second.
This was the earlier scenario and I want to make the same scenario again with the above information. Can someone guide me how to set up the environment and also the results. I have designed my script using Co-relation with the help regular expression extractor.enter image description here
For the normal Thread Group the configuration would be something like:
It would also be a good idea to use some ramp-up period so the load would increase gradually and you could correlate increasing load with other metrics like response time or transactions per second.
You might also want to use one of Custom Thread Groups which can be installed as JMeter Plugins, they provide easy visual way to define the number of threads, test duration, ramp-up, ramp-down, time to hold the load, eventual spikes, etc.
Once you define your desired workload you should run your test in command-line non-GUI mode, with regards to the test results the easiest option is to generate HTML Reporting Dashboard
I have read the user guide, here or on Blazemeter blogs regarding usage of flow action to implement dynamic pacing in Jmeter script with help of a JSR223 timer. I wanted to check if I can use JMX dummy sampler to implement the same JSR223 timer?
Does it really impact performance if using Dummy Sampler vs Flow Action in performance test scripts as both are samplers only. Please advise and any support link would be appreciated.
Impact performance of what?
"Pacing" is yet another approach to control the number of hits per second by slowing down the requests for whatever reason (not to overwhelm the application, send desired number of requests per second, etc.)
Any implementation of "pacing" is "killer" of the performance because it adds a pause between iterations instead of starting new iteration immediately so your question doesn't make a lot of sense. If you want to use the most resource efficient solution - you need to either share your implementation details for these 3 approaches or better measure it yourself using a profiler tool
If you're looking for a easier/better way of sending requests at constant rate instead of implementing the "pacing" I would rather recommend considering using of the following test elements:
Constant Throughput Timer
Precise Throughput Timer
Throughput Shaping Timer
I'm struggling to find a framework to help me test the performance of a service I am writing, that has a long running process it fronts. A simplified description of the service is:
POST data to the service /start endpoint, it returns a token.
GET the status of the action at /status/{token}, poll this until it returns a status of completed.
GET the results from /result/{token}.
I've dabbled with Locust.io, which is fine for measuring the responsiveness of the API, but does little for measuring the overall end to end performance. What I would really like to do is measure how long all three steps take to complete, particularly when I run many in parallel etc. I should imagine my service back end falls over far sooner than the rest API does.
Can anyone recommend any tools / libraries / frameworks I can use to measure this please? I would like to integrate it with my build pipeline so I can measure performance as code is changed.
Many thanks
The easiest option I can think of is going for Apache JMeter, it provides Transaction Controller which generates an additional "transaction" holding its children cumulative response time (along with other metrics)
"Polling" can be implemented using While Controller
Example test plan outline with results:
Context
I am using JMeter with JMeter-plugins for load testing. So far I was either modelling the traffic myself (ramp-up periods, bursts, etc.) or just doing full load testing. Now, however, I need to reproduce the exact same traffic as was in the access log, so for example if I had three requests at, say, 13:00:01, 13:00:03 and 13:00:06, I will need the sampler to hit those respective requests in same timing, second one being 2 seconds after the first, and third one being 3 seconds after the second.
I surfed the web for solutions, however the only hint I got was to write custom LogParser to extract timestamps and time differences. However that doesn't cover the actual timing at which the sample will send the request, since this is stored in ThreadGroup.
Summary
This leads me to my question : how can I reproduce the same exact traffic (with respect to time differences between requests) as was in the access log? I don't want to model a similar one (like Gaussian etc.), I need an exact copy of traffic.
If it's impossible in JMeter, please direct me to the right tool.
This is kind of a 2 part question
1) Is there a max number of HttpWebRequests that can be run at the same time in WP7?
I'm going to create a ScheduledTaskAgent to run a PeriodicTask. There will be 2 different REST service calls the first one will get a list of IDs for records that need to be downloaded, the second service will be used to download those records one at a time. I don't know how many records there will be my guestimage would be +-50.
2.) Would making all the individual record requests at once be a bad idea? (assuming that its possible) or should I wait for a request to finish before starting another?
Having just spent a week and a half working at getting a BackgroundAgent to stay within it's memory limits, I would suggest doing them one at a time.
You lose about half your memory to system libraries and the like, your first web request will take another nearly 20%, but it seems to reuse that memory on subsequent requests.
If you need to store the results into a local database, it is going to take a good chunk more. I have found a CompiledQuery uses less memory, which means holding a single instance of your context.
Between each call I would suggest doing a GC.Collect(), I even add a short Thread.Sleep() just to be sure the process has some time to tidying things up.
Another thing I do is track how much memory I am using and attempt to exit gracefully when I get to around 97 or 98%.
You can not use the debugger to test memory limits as the debug memory is much higher and the limits are not enforced. However, for comparative testing between versions of your code, the debugger does produce very similar result on subsequent runs over the same code.
You can track your memory usage with Microsoft.Phone.Info.DeviceStatus.ApplicationCurrentMemoryUsage and Microsoft.Phone.Info.DeviceStatus.ApplicationMemoryUsageLimit
I write a status log into IsolatedStorage so I can see the result of runs on the phone and use ScheduledActionService.LaunchForTest() to kick the off. I then use ShellToast notifications to let me know when the task runs and also when it completes, that way I can launch my app to read the status log without interrupting it.
Tyler,
My 2 cents here.
I don't believe there is any restriction on how mant HTTPWebequests you can spin up. These however have to be async, off course, and may be served from the browser stack. Most modern browsers including IE9 handle over 5 concurrently to the same domain; but you are not guaranteed a request handle immediately. However, it should not matter if you are willing to wait on a separate thread, dump your content on to the request pipe & wait for response on yet another thread. This post (here) has a nice walkthrough of why we need to do this.
Nothing wrong with this approach either, IMO. You're just going to have to wait until all the requests have their respective pipelines & then wait for the responses.
Thanks!
1) Your memory limit in a PeriodicTask or ResourceIntensiveTask is 5 MB. So you definitely should control your requests really careful. I dont think there is a limit in the code.
2)You have only 5 MB. So when you start all your requests at the same time it will terminate immediately.
3) I think you should better use a ResourceIntensiveTask because a PeriodicTask should only run 15 seconds.
Good guide for Multitasking features in Mango: http://blogs.infosupport.com/blogs/alexb/archive/2011/05/26/multi-tasking-in-windows-phone-7-1.aspx
I seem to remember (but can't find the reference right now) that the maximum number of requests that the OS can make at once is 7. You should avoid making this many at once though as it will stop other/system apps from being able to make requests.