Here I am trying to monitor system usage and the performance with different browsers which we use in selenium (Firefox,Chrome,Headless Browser).Just to know how it works.Generally we never use this method.
Performance factors :
Important influence factors to the performance of any Java program can be separated into two main parts:
1.Memory Consumption of your program
2.Total runtime of your program
Memory in Java :
Java manages the memory for use. New objects created and placed in the heap. Once your application have no reference anymore to an object the Java garbage collector is allowed to delete this object and remove the memory so that your application can use this memory again.
Java Heap :
In the heap the Java Virtual Machine (JVM) stores all objects created by the Java application, e.g. by using the “new” operator. The Java garbage collector (gc) can logically separate the heap into different areas, so that the gc can faster identify objects which can get removed.
The memory for new objects is allocated on the heap at run time. Instance variables live inside the object in which they are declared.
Java Stack :
Stack is where the method invocations and the local variables are stored. If a method is called then its stack frame is put onto the top of the call stack. The stack frame holds the state of the method including which line of code is executing and the values of all local variables. The method at the top of the stack is always the current running method for that stack. Threads have their own call stack.
read more and review code at https://seleniumbycharan.wordpress.com/2015/08/02/performance-monitoring-and-system-memory-usage-while-running-selenium-test-scripts/
Agreed, we often use cross browser testing tools to ease browser compatibility testing efforts. Great way to monitor the system usage while running selenium test scripts. Otherwise, we need to keep an eye on following checklist while testing web project on different browsers and operating systems:
1) CSS validation
2) HTML or XHTML validation
3) Page validations with and without JavaScript enabled
4) Ajax and JQeury functionality
5) Font size validation
6) Page layout in different resolutions
7) All images and alignment
8 ) Header and footer sections
9) Page content alignment to center, LHS or RHS
10) Page styles
11) Date formats
12) Special characters with HTML character encoding
13) Page zoom-in and zoom-out functionality
Looking up for more on this topic.