Sha256: dee8141eaba73ee3eedd2acb53e30884fc55920725b7f42488e05e5e0d28ef0f
Contents?: true
Size: 492 Bytes
Versions: 2
Compression:
Stored size: 492 Bytes
Contents
page = require('webpage').create() system = require 'system' if system.args.length is 1 console.log 'Usage: loadspeed.coffee <some URL>' phantom.exit() else t = Date.now() address = system.args[1] page.open address, (status) -> if status isnt 'success' console.log('FAIL to load the address') else t = Date.now() - t console.log('Page title is ' + page.evaluate( (-> document.title) )) console.log('Loading time ' + t + ' msec') phantom.exit()
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
phantomjs.rb-0.0.2 | vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/loadspeed.coffee |
phantomjs.rb-0.0.1 | vendor/phantomjs-1.5.0-liunx-x86-dynamic/examples/loadspeed.coffee |