Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tag: v0.0.1
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (21 sloc) 0.606 kb
#!/usr/bin/env ruby
require 'rubygems'
require 'pagespeed_grabber'
test_url = File.dirname(__FILE__).split('_',2).last
def clean_name(name)
name.gsub(/[ \(\)]/,'_').downcase
end
if ARGV[0].to_s == 'config'
puts "graph_title #{test_url} Webpagetest\n";
puts "graph_vlabel number\n";
puts "graph_scale no\n";
puts "graph_category other\n";
PagespeedGrabber::HEADERS.each do |header|
puts "#{clean_name(header)}.label #{header}\n"
end
else
initial, repeated = PagespeedGrabber.fetch(test_url)
initial.each do |header, value|
puts "#{clean_name(header)}.value #{value}"
end
end
Jump to Line
Something went wrong with that request. Please try again.