Key Performance monitoring tools

Shiksha Engineering
Shiksha Engineering
5 min readMar 11, 2021

--

Credit: httpswww.perfmatrix.comwhat-is-performance-testing

What is performance testing?

It is a non-functional testing technique performed to determine the system parameters in terms of responsiveness and stability under various workload. Performance testing measures the quality attributes of the system, such as scalability, reliability and resource usage.

Performance testing in Shiksha

Below performance testing techniques are used in Shiksha

  1. Sitespeed
  2. Google page speed
  3. JMeter

Sitespeed

Sitespeed.io is a complete web performance tool that helps to measure the performance of your website. It test web sites using real browsers, simulating real user’s connectivity and collect important user centric metrics like Speed Index and First Visual Render etc.

For Details refer: https://medium.com/shiksha-engineering/sitespeed-io-e19c3188f8a5

Google page speed

Also referred as PageSpeed Insights (PSI) reports the performance of a page on both mobile and desktop devices, and provides suggestions on how that page may be improved. PSI provides both lab and field data. Below are the details on type of data received from PSI:

Performance score

This score is determined by running Lighthouse to collect and analyze lab data about the page.

Below are the score and performance mapping

Credits: www.shiksha.com

Real-World Field Data

When PSI is given a URL, it will look it up in the Chrome User Experience Report (CrUX) dataset. If available, PSI reports the First Contentful Paint (FCP), First Input Delay (FID), Largest Contentful Paint (LCP), and Cumulative Layout Shift (CLS) metric data for the origin and potentially the specific page URL.

How PSI works:

Below are the steps to be followed to fetch performance data via page speed

  • Use below URL to analyze any page

https://developers.google.com/speed/pagespeed/insights/?url=<PAGE URL>&tab=<DEVICE TYPE>

Eg: https://developers.google.com/speed/pagespeed/insights/?url=shiksha.com&tab=mobile

  • PSI will analyze the page and return the performance data. Refer below image :
Credits: www.shiksha.com

This data can also be fetched via Lighthouse API, as mentioned below:

https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=https://www.shiksha.com

Credits: www.shiksha.com
  • All the performance parameters can be fetched from here or from frontend.

Advantages

  1. As compare to other performance tools google page speed is faster and easy to use.
  2. It does not require any machine setup or other infra facilities.

Disadvantage

  • Only issue with Google page speed is, performance of Test webpages can’t be measured via PSI.
  • Can’t access local infra.

JMETER

The Apache JMeter application is open source software, designed to load test functional behavior and measure performance. JMeter originally is used for testing Web Application or FTP application. It’s also being used in functional test, database server test etc.

Use in Shiksha

In Shiksha JMeter was implemented for performance testing across all pages of Shiksha. JMeter simulates a group of users sending requests to a target server, and return statistics information of target server.

In Shiksha performance testing, only one request was sent instead of multiple and all the statistics returned were stored in DB to analyze performance. This activity was performed on daily basis to monitor the performance of pages.

JMeter is no longer used in Shiksha for performance testing as It was unable to handle on page XHR calls, also JMeter is a load testing tool. More efficient tools for performance testing like Sitespeed and Google page speed are now in use.

How Performance Testing works in Shiksha works

Below iteration takes place to measure performance of Shiksha

  1. Sitespeed.io runs on all Shiksha pages 4 times in a day for Test and Live Shiksha pages and collects the required matrix.
  2. Similarly Google page speed runs 4 times parallel with Sitespeed through all the pages of live Shiksha site and collects performance data.
  3. These matrix from Sitespeed and google page speed are aggregated day wise to fetch the average performance of a page in a day
  4. Aggregated matrices are than stored in the database
  5. These matrices are then displayed on the Shiksha performance dashboard
  6. Database also consist of a table having the threshold performance matrix of each page
  7. After each execution the matrix obtained are compared to the threshold respectively and if the value has 20% increase/decrease as compared to the threshold, that matrix is not included in the aggregation.
  8. If there is 20% increase/decrease in the matrices of the pages than an alert mailer is triggered with the details of those particular pages.

Parameters collected in performance testing:

Credits:www.shiksha.com

Performance Dashboard

We are using HTML, CSS, Bootstrap, Java Script, Java EE, Servlet, JSP, JDBC and MySql for creating performance dashboard. Shiksha Dashboard is hosted on Apache Tomcat.

There are 4 sections present in Performance dashboard

  1. Test Sever Report (National) : Shiksha National test Site
  2. Test Server Report (SA): Shiksha study abroad test site
  3. Live Server Report (National): Shiksha National Site
  4. Live Server Report (SA): Shiksha study abroad site

All these section have 3 subsections consisting of matrix mentioned above i.e, Size Matrix, Time Matrix, Score Matrix.

Credits: www.shiksha.com

If we go further into any one Matrix below detailed classification of performance matrix is displayed on the dashboard

  1. Report shows 3 divisions:
  • Page: Name of page
  • Desktop: Matrix values on Desktop
  • Mobile: Matrix values on Mobile

2. Desktop and Mobile division consist the values of all the performance parameters of Shiksha.

3.Two arrows of red and green color are displayed beside the parameter value

www.shiksha.com
  • Red: It indicates 10% degrade in the value of parameter since the last performance check
  • Green: It Indicates 10% improvement in the value of parameter since the last performance check

Graphical Representation of Metrics

  1. Size:
Credits: www.shiksha.com

2. Time Metrics:

Credits: www.shiksha.com

3. Score Metrics:

Credits: www.shiksha.com

Why Sitespeed.io and Google Page Speed

  1. Easy to implement.
  2. Very less Infrastructure is needed for Sitespeed and none is required for Google page speed.
  3. Fast and accurate results.
  4. Sitespeed can check performance for both Test and Live site.
  5. Google page speed can check performance for live web pages.

References:

--

--