I am using App Insights from Azure to get the analytic data for a website.
From the browserTimings and Pageviews settings I am able to get the Load time and receiveDuration.
My website has certain ajax requests loading in (async=true) manner. Due to which in chrome network capture, I am able to see Finish:2.15 Sec , DOMContentLoaded :1.05 s, Load: 1.57 s.
Problem statement is How to get the actual time (which attribute) by which the html (DOM) is ready for a user for interaction in App Insights analytics report.
Answer is Client Processing Time. You can understand better from this pic.
MS disclaimer:
The time is measured from when the browser sends the initial HTTP request until all synchronous load events have been processed, including layout and running scripts. It doesn't include asynchronous tasks such as loading web parts from AJAX calls.
For more details: MS documentation
Related
I'm not new in load testing. My job is to create a load testing with jmeter. I did not bother with tread number, clients, memory consumption ,etc. For jmeter load testing i used 3 client , each of them run 1000 threads (30% CPU was used), results were expected all the time. No problems were detected on SUT or clients.
I'm put before new challenge. Now i have to execute web performance testing on browsers.I don't know if i create a correct picture about performance testing.
I want to measure, first byte, load time on web page, java script, Ajax, etc,...
Web automation tests are written in selenium. Selenium is not mentioned for web load testing.
Lets say to simulate 1.000 users clicking ob browser, this means a lot of VM, collecting results from browsers(DOM counters), SUT is managed by PS script to take data from perf. counters. I see a problem a lot of VM means also financial budget which i do not have.
I'm in doubt if the upper approach is correct or should change my approach.
One of these tools is Visual Studio Ultimate edition. But i still need a lot of VM to simulate 1,000 users - browsers.
On the internet i read a documents, descriptions, top tools.
How do you do changeling web page performance testing on you company.
Any help about web page performance will be appreciated.
Thanks,
Dani
Well-behaved JMeter script must look exactly like real browser does from the server's perspective, just make sure you properly handle the next few bits:
Embedded resources via "Advanced" tab of the HTTP Request Defaults
Cache via HTTP Cache Manager
Cookies via HTTP Cookie Manager
Headers via HTTP Header Manager
AJAX requests via Parallel Controller
See How to make JMeter behave more like a real browser article for more details.
Assuming all above you should be able to mimic the load on HTTP protocol level. If you need to measure rendering or JS execution speed additionally you can add another Thread Group with 1 (or several threads) and use WebDriver Sampler which provides JMeter integration with Selenium. Additionally you can collect some extended stats using i.e. Navigation Timing API via WDS.browser.executeScript() method allowing execution of arbitrary JavaScript code.
I'm trying to develop chat system in php, sql and ajax. I created function by ajax to get messages from database this function its event when window upload, so if i open 2 windows in browser to test the application, I found the messages bu when i send message it appear in just the window which send from not both of the 2 windows. To solve this problem i used setInterval function every 1 second to show messages.
Do this huge requests damage the server ??
I don't quite know what you meant with "Damage", but nothing can be really damaged by a few extra requests.
If you're wondering whether the webserver can handle the load, it really depends on how many chat sessions are going at the same time. Any decent web server should be able to handle a lot more than two requests per second. If you have thousands of chat sessions open, or you have very CPU intensive code, then you may notice issues.
A bigger issue may be your network latency. If your network takes more than a second for a round-trip communication with the server, then you may end up with multiple requests coming from the same client at the same time.
I've got a web application which using JS loads some assets from a remote server. I've got a strange issue where the reception back of some calls is very long - though it has the same size as others.
What could be the reason? Any techniques to find out?
Here is an example of the calls:
You can see the last and first call - the actual content is almost the same size, but the reception time of the last call is MUCH larger than the first one (1.3 min vs 36 sec)
P.S - the calls go to the SAME endpoint on the same server (just other params)
Thanks!
After all the clarifications & your acknowledgement of ~30 seconds of processing time being "normal" and "accepted". The likely reason is because your web server is flushing the output buffer.
Some useful information:
PHP
php flush
IIS
Can I Flush the Buffer Early Using ASP.NET?
Some background info:
When users request a page, it can take anywhere from 200 to 500ms for
the backend server to stitch together the HTML page. During this time,
the browser is idle as it waits for the data to arrive. In PHP you
have the function flush(). It allows you to send your partially ready
HTML response to the browser so that the browser can start fetching
components while your backend is busy with the rest of the HTML page.
The benefit is mainly seen on busy backends or light frontends.
Technically, it's better for your web server to flush them as soon as possible, firstly, you free up memory, secondly, the client (browser in this case) can start rendering with the chunks of data.
Whenever I make a single-page HTML5 app, I generally have the following procedure:
The user requests a page from the server, and the server responds
with the appropriate html.
Once the page returns, Javascript on the client-side requests documents from the server (the current user, requested docs, etc.)
The client waits for yet another response before rendering, often resulting in a 'flicker' or necessitating a loading icon.
Are there any strategies for preloading the initial document requests and somehow attaching them -- a javascript object or array -- to the initial page response?
I am busy developing a Firefox extension and I have a Widget that opens a Panel. How do I have a background script that is constantly running/polling the server to fetch updates. These updates would then need to be injected into the DOM of the Panel.
All of your extension scripts are "background scripts". What you are asking about seems to be a way to poll the server regularly - you use the timers module for that, method setInterval(). The callback would than use the request module to send a request to the server.
As to communicating information to a widget/panel - you use the usual approach to send messages to the content scripts running there.