Coder Social home page Coder Social logo

qainsights / black-friday-performance-testing Goto Github PK

View Code? Open in Web Editor NEW
11.0 4.0 7.0 1.7 MB

๐Ÿฆƒ Black Friday Performance Testing Experiment ๐Ÿ™

Python 100.00%
black-friday thanksgiving python performance performance-testing performance-engineering utilities web website web-performance

black-friday-performance-testing's Introduction

contributions welcome saythanks

๐ŸŽฏ Objective

The objective of this exercise is to measure the response time trend of popular US retail websites during Thanksgiving and Black Friday 2021. This will help us to reveal the performance and its effect of retain giants.

๐Ÿ” Strategy

This experiment will not inject load to the websites under test. The script will send only one HTTP(S) request every 30 minutes to measure the performance. The actual workload will be from the real users.

HTTP request timeout is set to 30 seconds. If the script doesn't receive any response from Page Speed, then that request will be ignored.

Only the desktop performance will be captured.

๐ŸŒ List of Websites under test

Here are the URLs which will be tested. If you would like to add any other websites, please submit a PR.

๐Ÿ”ง Tools

  • Page Speed Insights
  • Python 3.9
  • GitHub Actions
    • Chrome browser
    • Ubuntu latest
  • Influx DB Cloud (Free Plan)

โŒ› Test Window

Test will start at 12.00 AM EST on Nov 25 and ends at 12.01 AM EST Nov 30.

๐Ÿ”ข Results

Results will publish instantly to InfluxDB cloud.

๐Ÿ“Š Performance Metrics

Following metrics will be captured:

  • First Contentful Paint (FCP)
  • First Input Delay (FID)
  • Largest Contentful Paint (LCP)
  • Cumulative Layout Shift (CLS)

๐Ÿ‘ฉโ€๐Ÿณ How to set up this experiment on your own?

  • Clone this repo
  • Install the requirements using pip install -r requirements.txt
  • Grab a Page Speed Insights API from here.
  • Create GitHub secrets for the following. For instructions, please check here. Never ever expose your API key in your repo.
    • API_KEY - PageSpeed API key
    • BUCKET_NAME - Influx DB bucket name
    • INFLUX_API_KEY - Influx DB API key
    • INFLUX_URL - Influx DB cloud URL
    • INFLUX_ORG - Influx Org name
  • In your .github/workflows/python-app.yml file, configure your details in the line 41 and 42.
  • By default, GitHub Action will get triggered on every push.
  • To schedule the run for every 15 minutes, use the below config in the yaml file.
 on:
  schedule:
    # * is a special character in YAML so you have to quote this string
    - cron:  '*/15 * * * *'

โ“ FAQs

  • Can I view the performance realtime?
    • Yes. Using the Influx DB cloud, the results will get published instantly.
  • What is the cost involved in this experiment?
    • Nothing. All are using free resources.๐Ÿ˜Š

black-friday-performance-testing's People

Contributors

ajgupdr avatar qainsights avatar sambgm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

black-friday-performance-testing's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.