Git Product home page Git Product logo

webpagetest's Introduction

WebPageTest

This is the official repository for the performance-testing code that runs at webpagetest.org.

Troubleshooting private instances

If your instance runs, but you’re having issues configuring agents, navigate to http://{your_instance’s_ip}/install to check for a valid configuration.

Testing

WebPageTest uses PHPUnit for unit tests. To set up and run the unit tests:

  1. Install Composer
  2. Install apcu
  3. Add the line apc.enable_cli='on' to your php.ini
  4. Run composer install
  5. Run composer test

Contributing

There are separate lines of development under different licenses (pull requests accepted to either):

Code style

WebPageTest uses PSR12 coding conventions for PHP linting and formatting. For JavaScript and CSS formatting we use Prettier with its default configuration. Additionally we use Stylelint for CSS linting.

Before you send a pull request please make sure to run: composer lint && composer format.

Alternatively you can run

  • composer lint:php && composer format:php if you only touched PHP code, or
  • composer lint:css && composer format:prettier if you only touched CSS or JavaScript code

VSCode integration

If you use VSCode you might find it helpful to install Prettier and PHP Intelephence plugins and use these in your "settings.json":

{
  "[php]": {
    "editor.tabSize": 4
  },

  // uncomment to reformat on every file save
  //"editor.formatOnSave": true,

  "phpcs.standard": "PSR12",

  "files.trimTrailingWhitespace": true,

  "files.eol": "\n",

  "files.associations": {
    "*.inc": "php"
  }
}

webpagetest's People

Contributors

andydavies avatar bryanmcquade avatar claud-io avatar deathbearbrown avatar dependabot[bot] avatar geening avatar gfx avatar jefflembeck avatar jirawat050 avatar jklein avatar josephscott avatar jossy avatar klepikov avatar lbartoli79 avatar lirantal avatar mjkozicki avatar patrickhulce avatar pmeenan avatar rviscomi avatar sammeboy635 avatar scottjehl avatar skerner avatar stephendonner avatar stoyan avatar tkadlec avatar tonyperkins avatar tunetheweb avatar vibaldem avatar wildlyinaccurate avatar zhaoq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webpagetest's Issues

Add an "Edit and Re-run Test" option

While the re-run option is very useful, a very common need (for me, at least) is to rerun the current test with a few modifications to the configuration.

Examples include:

  • Add more "debug" info (tcpdump, chrome dev timelines, etc)
  • Add video
  • Change network speed to help debug the source of a problem
  • Change the browser to see if a problem is browser specific
    ...

It'll be great if there was a button from a test result that opened the "New Test" screen, but pre-populated all the fields with the details from the original test.

https://code.google.com/p/webpagetest/issues/detail?id=108

Create nice looking "executive summery" of webpagetest output

Generate a document that explains what is done right and what can be improved based on a webpagetest run. The report should be comprehendible to management, so that someone improving performance can easily show the result of their work to their boss.

Deciding what to say in this report is tricky. Might test by showing a report to a project manager who understands the web, but is not a coder.

https://code.google.com/p/webpagetest/issues/detail?id=17

Use HAR for internal storage of results

Migrate from the tab-delimited results files to HAR files for the test results (with all data from all of the runs in a single compressed HAR file).

This will significantly reduce the number of files for storing the results and should also reduce the disk space required.

Once we can natively operate on HAR files then importing them will also be trivial.

This will require extending the HAR spec to support the data that we capture that is not already part of the spec.

From the perspective of the code for loading the results, the loader routines are already centralized so we can make them capable of dealing with both file types.

https://code.google.com/p/webpagetest/issues/detail?id=24

Repeat View Data Not Showing Up

(reported by leizlmae on Google Code)

What steps will reproduce the problem?
Run test on http://www.trutv.com/video/most-shocking/worst-burglar-ever.html

What is the expected output? What do you see instead?
Occasionally the test runs as expected, but more often than not the test finishes and only has the first view data displayed.

What version of the product are you using? On what operating system?
I'm using the instance on WebPageTest.org

Please provide any additional information below.
I've re-run the test multiple times, probably 6 or 7 at this point, and only twice did I come up with the expected first and repeat view results.

https://code.google.com/p/webpagetest/issues/detail?id=72

Auto-hide relay locations that haven't checked in in a while

WPT has a great feature that automatically hides devices that haven't connected in a while, to keep them from accumulating a large backlog and frustrate users.
Relayed locations don't benefit from that, and will show as live even if they've been dead for a while.

The auto-hide functionality should be expanded to include relayed locations.
On a similar note, the "time since last check" for relayed locations should also be available through the checklocations.php and other scripts to allow users of the API identify a location is inactive too.

Implementation note: Periodically in the getwork.php cron support we should connect to all remote locations and fetch the "last check" information and populate the local .tm files. Everything else should automatically work once that is in place.

Update frequency does not need to be more than every 15 minutes since the threshold is 30-60 minutes but it wouldn't be a bad idea to do it a little more frequently (say every 5 minutes). We could potentially grab the backlog at the same time so we can provide some feedback on overloaded locations.

https://code.google.com/p/webpagetest/issues/detail?id=75

Check gzip compression ratio

Apache provides an option to control gzip compression level:

http://httpd.apache.org/docs/2.0/mod/mod_deflate.html#deflatecompressionlevel

DeflateCompressionLevel 1 (fastest compression) - 9 (best compression) - default is 6.

I think we could add a test to check if resources are gzip using highest possible level. Believe or not, but someone in my team changed the config to 1 and this issue existed not noticed for around 2 years!

The different for an example javascript file minified using yui is:

478969 original.js
182607 original.js-fast.gz
157171 original.js-6.gz
156894 original.js-best.gz

So the diff between 6 and 9 is not much (277b, 0.2%), the diff between 1 and 9 is significant (25k, 14%).

https://code.google.com/p/webpagetest/issues/detail?id=104

Investigate browser hang

http://www.webpagetest.org/forums/showthread.php?tid=11231

This page will reliably hang the test agents: http://quicktrip.brusselsairlines.com/SN/search.html?CityName2=&KMINewsletterSmall1%24txtEmail=My%20e-mail&KMINewsletterSmall1%24txtLastname=My%20Last%20Name&NumAdult2=1&NumChild2=0&NumRooms2=1&bookingClass=S&cabinClassFareLogicalName=ANY&dateSearchType=flexible&ddlFromAirportCheckin=BRU&depDate=10%2F7%2F2012&departDateDay=10&departDateMonth=7&departDateRange=0&departDateYear=2012&departureDate=2012-7-10&destination=LHR&footer%24select_otherwebsite=Other%20websites&&journeySpan=RT&landingPage=http%3A%2F%2Fwww.brusselsairlines.com%2Fcom%2Fbook%2Fflights%2Fc%E2%80%8Bonfirmation.aspx&lang=EN&numAdults=1&numChildren=0&numInfants=0&numSeniors=0&numYouths=0&origin=BRU&panel_type=lnkDetails&pickup_city_vibe=&promotion=&retDate=17%2F7%2F2012&returnDate=2012-7-17&returnDateDay=17&returnDateMonth=7&returnDateRange=0&returnDateYear=2012&returnJourneySpan=true&searchType=NORMAL&serviceType=Lowest%2Bfare%2Bavailable&topnavigation%24txtLogin=Email&topnavigation%24txtPin=Password&trip_default_promotion_code=&trip_departure_day3=15%2F06%2F2012&trip_return_day3=16%2F06%2F2012&txtBooknr=&txtBooknr2=&txtLastname=&txtLastnameCheckin=&type_of_flight=return

Probably some shared code in the optimization checking that is crashing.

Here's fresh URL with updated date params:

ignoreErrors 1
setTimeout 120
http://quicktrip.brusselsairlines.com/SN/search.html?CityName2=&KMINewsletterSmall1%24txtEmail=My%20e-mail&KMINewsletterSmall1%24txtLastname=My%20Last%20Name&NumAdult2=1&NumChild2=0&NumRooms2=1&bookingClass=S&cabinClassFareLogicalName=ANY&dateSearchType=flexible&ddlFromAirportCheckin=BRU&depDate=10%2F7%2F2012&departDateDay=10&departDateMonth=9&departDateRange=0&departDateYear=2012&departureDate=2012-9-10&destination=LHR&footer%24select_otherwebsite=Other%20websites&&journeySpan=RT&landingPage=http%3A%2F%2Fwww.brusselsairlines.com%2Fcom%2Fbook%2Fflights%2Fc%E2%80%8Bonfirmation.aspx&lang=EN&numAdults=1&numChildren=0&numInfants=0&numSeniors=0&numYouths=0&origin=BRU&panel_type=lnkDetails&pickup_city_vibe=&promotion=&retDate=17%2F7%2F2012&returnDate=2012-9-17&returnDateDay=17&returnDateMonth=9&returnDateRange=0&returnDateYear=2012&returnJourneySpan=true&searchType=NORMAL&serviceType=Lowest%2Bfare%2Bavailable&topnavigation%24txtLogin=Email&topnavigation%24txtPin=Password&trip_default_promotion_code=&trip_departure_day3=15%2F06%2F2012&trip_return_day3=16%2F06%2F2012&txtBooknr=&txtBooknr2=&txtLastname=&txtLastnameCheckin=&type_of_flight=return

https://code.google.com/p/webpagetest/issues/detail?id=100

Implement video rendering on the server

Right now videos are rendered on client machines using a combination of avisynth and x264. This allows for a lot of flexibility in creating video templates but it is largely unused. Instead, we can render the individual video frames as png files on the server and use ffmpeg (or x264) directly and render the videos 100% on the server.

Would probably make sense to spawn it as a background process that writes progress information so that the UI could update the user as the video is rendered.

https://code.google.com/p/webpagetest/issues/detail?id=52

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.