Current time: 12-15-2017, 04:42 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Benchmarks and Scripting
06-24-2014, 04:43 AM
Post: #1
Benchmarks and Scripting
I did not realize WPT has benchmarking capabilities till I ran into the code.

I saw a few samples and here's my quick question: Can I add a script instead of a URL for the benchmark value

Say the current bm.txt looks as follows

Landing Page http://news.yahoo.com/

Can I do something like

Landing B Page <insert setDns and navigate here>

If not, I would like to do it as its immensely helpful to me in m yday to day work
Find all posts by this user
Quote this message in a reply
06-24-2014, 06:24 AM
Post: #2
RE: Benchmarks and Scripting
Nevermind, I found the solution by reading the document here:

https://sites.google.com/a/webpagetest.o...benchmarks
Find all posts by this user
Quote this message in a reply
06-24-2014, 06:32 AM
Post: #3
RE: Benchmarks and Scripting
Warning, the benchmark support is still pretty rough, though feedback is very much appreciated.

Yes, There are 2 ways to do it depending on if you want a bunch of different scripts (1) or the same script applied to a bunch of different URLs (2).

1) The URL list can contain scripts or urls for each entry. It's a bit convoluted because the script needs to fit on one line in the url list so you need to use \t for the tab separators and \n for the line separators. i.e.:

script:setDns\twww.webpagetest.org\t1.2.3.4\nnavigate\thttp://www.webpagetest.org/

2) You can pass a script as a test option. The scripts support a couple of substitution markers so that you can use the same script with a bunch of URLs:
%URL% - gets replaced with the URL being tested
%HOST% - gets replaced with the host name of the URL being tested

A script can look like:
setDns %HOST% 1.2.3.4
navigate %URL%

Then any URL tested will have it's host name redirected to 1.2.3.4 before navigating to the test page.
Visit this user's website Find all posts by this user
Quote this message in a reply
06-28-2014, 12:42 AM
Post: #4
RE: Benchmarks and Scripting
Is there any way to save the results of all websites if i use automated script to navigate the URL's.

Example:

logData 1
navigate news.aol.com
navigate http://www.google.com
navigate http://www.aol.com

I want to log the results for all 3 websites.How can I do that?
Find all posts by this user
Quote this message in a reply
07-01-2014, 04:06 AM
Post: #5
RE: Benchmarks and Scripting
You can't, it has to be done as 3 separate tests, each one only logging data for one of the steps.

It's mostly a UI/processing issue with being able to present multiple steps in a single test (pull requests that hack away at the problem without breaking the existing behavior are welcome).
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)